-
-
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
missing extension in import paths in @babel/runtime/helpers/esm #12158
Comments
Hey @jedwards1211! 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." |
Seems like this will be fixed by #10853 |
Duplicate of #12003 |
Duplicate of #8462 |
Fixed in |
Bug Report
File extensions are required in import statements in ES Modules.
But files within
@babel/runtime/helpers/esm
(which are treated as ES Modules because@babel/runtime/helpers/esm/package.json
containstype: "module"
) don't use extensions in their import statements.Current behavior
I'm getting this correct error with Webpack 5:
This is because the first line of
@babel/runtime/helpers/esm/get.js
is an import without an extension:Input Code
Expected behavior
No problems using
@babel/plugin-transform-runtime
withuseESModules: true
Babel Configuration
Environment
@babel/runtime
: 7.11.2@babel/plugin-transform-runtime
: 7.11.5webpack
: 5.0.0-rc.4babel-loader
: 8.1.0Possible Solution
Use full extensions in imports inside
@babel/runtime/helpers/esm
, so I don't get these errors, for example:The text was updated successfully, but these errors were encountered: