mirror of
https://github.com/hanzoai/babel.git
synced 2026-10-30 14:46:06 +00:00
* Convert `@babel/helpers` tests to ESM * Run some tests on older versions * Fix * Update jest.config.js
22 lines
461 B
JavaScript
22 lines
461 B
JavaScript
import defineHelper from "../../../helpers/define-helper.js";
|
|
|
|
const main = defineHelper(import.meta.url, "main", `
|
|
import dep from "(!!!)%-..a,4892 missing";
|
|
|
|
export default function helper() {
|
|
return dep();
|
|
}
|
|
`);
|
|
|
|
export default function() {
|
|
return {
|
|
visitor: {
|
|
Identifier(path) {
|
|
if (path.node.name !== "REPLACE_ME") return;
|
|
const helper = this.addHelper(main);
|
|
path.replaceWith(helper);
|
|
},
|
|
},
|
|
};
|
|
};
|