fix: supply '.' subpath for backward compatibility with node.js 13.0-13.1#11006
Merged
JLHwung merged 1 commit intobabel:masterfrom Jan 15, 2020
Merged
fix: supply '.' subpath for backward compatibility with node.js 13.0-13.1#11006JLHwung merged 1 commit intobabel:masterfrom
JLHwung merged 1 commit intobabel:masterfrom
Conversation
nicolo-ribaudo
approved these changes
Jan 14, 2020
existentialism
approved these changes
Jan 15, 2020
This was referenced Feb 24, 2020
Member
|
Wouldn’t node 13.3+ have failed with exports false too? Keeping the dot is the correct change, since exports replaces main. |
Contributor
Author
I don't think so. Actually the docs says that
When |
Member
|
ah, good point. |
This was referenced Mar 7, 2020
This was referenced Mar 14, 2020
This was referenced Mar 26, 2020
This was referenced Apr 3, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following snippet will throw on Node.js <= 13.2
This issue is blocking the
preset-envusers on Node.js 13.0 - 13.1The issue is from upstream, which was fixed in https://github.com/nodejs/node/pull/29978/files#diff-76195ce57689942222a27f0dbda6d3b7R495 and later shipped in Node.js 13.2.
Since Node 13 is still current, we offer a
.subpath for backward compatibility to Node.js 13.0 - 13.1. Technically if users are running at node.js 12 with--experimental-moduleson, they will also see this error, but practically it is a rare situation.I suggest we simply drop node 13.0 - 13.1 support on Babel v8 so we can continue to use
exports: false, it is not a big deal because node 13 is not a LTS candidate and will go EOL at June.