mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* chore: bundle babel-cli and babel-node * chore: bundle babel-helper-builder-react-jsx * refactor: unify extra entrypoints handling * chore: bundle babel-helper-transform-fixture-test-runner * chore: bundle babel-helper-fixtures * build: bundle babel-helpers * build: bundle babel-build-external-helpers * refactor: reuse pkgJSON in PackageInfo * refactor: skip inputs path normalization * build: bundle babel-eslint-parser * fixup babel-helpers * revert babel-cli bin changes * update npm-ignore generators * cleanup outdated comments * test(eslint): avoid private sub imports * chore: bundle babel-eslint-* * chore: bundle babel-register * chore: skip rollup for private packages
22 lines
485 B
JavaScript
22 lines
485 B
JavaScript
import defineHelper from "../../../helpers/define-helper.js";
|
|
|
|
export default function(babel) {
|
|
const main = defineHelper(babel, import.meta.url, "main", `
|
|
import dep from "(!!!)%-..a,4892 missing";
|
|
|
|
export default function helper() {
|
|
return dep();
|
|
}
|
|
`);
|
|
|
|
return {
|
|
visitor: {
|
|
Identifier(path) {
|
|
if (path.node.name !== "REPLACE_ME") return;
|
|
const helper = this.addHelper(main);
|
|
path.replaceWith(helper);
|
|
},
|
|
},
|
|
};
|
|
};
|