Skip to main content

@babel/helper-split-export-declaration

JavaScript
declare export default splitExportDeclaration(path: NodePath);

Usage

JavaScript
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);
},
});