You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @sagargurtu! We really appreciate you taking the time to report an issue. The collaborators on this project attempt to help as many people as possible, but we're a limited number of volunteers, so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack community that typically always has someone willing to help. You can sign-up here for an invite.
I cannot reproduce this 馃 Can you also check which versions of @babel/plugin-transform-modules-commonjs and @babel/helper-module-transforms do you have?
EDIT: I can reproduce this: it does not happen when using a .js extension.
Oh this is fun. In Babel 6 we had the same behavior that Node.js currently has, but at the time Node.js was more restrictive and only supported default imports in .mjs files. #7545 aligned our behavior to what Node.js was doing, by removing support for named imports.
Then, Node.js changed their behavior to what Babel 6 was doing, so we can change our again to match Node.js.
馃捇
How are you using Babel?
@babel/cli
Input code
Configuration file name
.babelrc.js
Configuration
Current and expected behavior
Current Behavior
The above
.mjs
file is compiled to:Expected Behavior
The above
.mjs
file should be compiled to:Npm Script
Environment
System:
Binaries:
npmPackages:
Possible solution
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: