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
Allow require()
of runtime helpers in Node.js 13.2-13.6
#12893
Conversation
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 59a87a9:
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/42507/ |
1efcafb
to
59a87a9
Compare
CI is fixed on |
@larixer Are self-references (documented in the first tip here) supposed to work with the After merging this PR to The problem is that var objectWithoutPropertiesLoose = require("@babel/runtime/helpers/objectWithoutPropertiesLoose"); and this ends up requiring |
@nicolo-ribaudo No, they don't fully work. The node-modules linker is meant to be 100% compatible with yarn classic, only adding features is allowed, breaking compatibility is not allowed. Because of this, self-references are supported only in a limited way, basically the same way as supported by yarn classic. Better self-references support can be theoretically implemented for nm linker, but the support should be enabled via some config setting. For this case this would basically mean creating symlink |
Oh ok thanks for the reply 👍 For now I'm adding |
This PR restores compatibility with Node.js 13.2-13.6.
We now have tests for every Node.js versions where there were ESM-related changes and for Webpack/Rollup, so I'm confident that these changes don't break anything.
The fix is based on https://twitter.com/ljharb/status/1364324634540142596.