-
-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
transformer: research inserting helper methods with import
or require
#7396
Comments
Helper methods should already inserted as |
Babel uses numerous conditions to decide on what to insert: https://github.com/babel/babel/blob/54a8389fa31ce4fd18b0335b05832dc1ad3cc21f/packages/babel-helper-module-imports/src/import-injector.ts#L20-L78 |
There is one failing test case in monitor-oxc due to this confusion:
We inserted the wrong import in one of the files in |
I'm confused. Our transforms only insert imports from It's present in the original source: https://www.npmjs.com/package/@azure/core-rest-pipeline?activeTab=code |
The transformer transformed files in It has nothing to do with the importer file. |
Actual offending file: https://cdn.jsdelivr.net/npm/[email protected]/dist/index.js I need to figure out why it's set as a module oxc/crates/oxc_transformer/src/common/module_imports.rs Lines 157 to 164 in 6e48059
|
oxc/crates/oxc_span/src/source_type/mod.rs Line 472 in 6e48059
If we want to make this proper, we need to start |
I still don't get what's going on in that failing test with In In the case of |
cjs vs esm 😡
The text was updated successfully, but these errors were encountered: