|  | 2 weeks ago | |
|---|---|---|
| .. | ||
| lib | 2 weeks ago | |
| README.md | 2 weeks ago | |
| package.json | 2 weeks ago | |
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);
  },
});