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
Align regenerator-transform
import with native ESM
#13086
Align regenerator-transform
import with native ESM
#13086
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/45076/ |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ebf7a43:
|
src => src.startsWith("babel-plugin-polyfill-"), | ||
]; | ||
const depsUsing__esModuleAndDefaultExport = src => | ||
src.startsWith("babel-plugin-polyfill-") || src === "regenerator-transform"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, is there anything else other than regenerator-transform
that would need to be added? Would we need to update this if we added another similar dep?
Oh so via #13017, it's only esm/cjs packages that have been transformed with babel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the only problem is dependencies that have been transformed with Babel.
I managed to create a working build just with this change so I think it's the only one (also I tried looking for other export ... from
of dependencies and this is the only one), but if we'll ever find a new one we can always add it to this list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok was just worried it would break without us knowing and whether one could verify!
Merging since this is a really small internal change, that I forgot to do in another PR. The new tests doesn't test changed behavior, but it's just to be 100% sure I didn't accidentally break something. |
I missed this in #12795 because it was using
export ... from
rather than import.regenerator-transform
is a compiled CJS module, so thedefault
export in Node.js ismodule.exports
and we'll need to get.default
frommodule.exports
(thus.default
from thedefault
export).