|
|
před 2 týdny | |
|---|---|---|
| .. | ||
| lib | před 2 týdny | |
| README.md | před 2 týdny | |
| package.json | před 2 týdny | |
declare export default splitExportDeclaration(path: NodePath);
import traverse from "@babel/traverse";
import splitExportDeclaration from "@babel/helper-split-export-declaration";
// ...
traverse(file, {
ExportDefaultDeclaration(path) {
if (!path.get("declaration").isClassDeclaration()) return;
splitExportDeclaration(path);
},
});