-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix: supply '.' subpath for backward compatibility with node.js 13.0-13.1 #11006
Conversation
Wouldn’t node 13.3+ have failed with exports false too? Keeping the dot is the correct change, since exports replaces main. |
I don't think so. Actually the docs says that
When |
ah, good point. |
The following snippet will throw on Node.js <= 13.2
This issue is blocking the
preset-env
users 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-modules
on, 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.