|
il y a 1 an | |
---|---|---|
.. | ||
lib | il y a 1 an | |
README.md | il y a 1 an | |
package.json | il y a 1 an |
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);
},
});