Add support for native esm to @babel/runtime#10748
Merged
nicolo-ribaudo merged 4 commits intobabel:masterfrom Nov 22, 2019
Merged
Add support for native esm to @babel/runtime#10748nicolo-ribaudo merged 4 commits intobabel:masterfrom
nicolo-ribaudo merged 4 commits intobabel:masterfrom
Conversation
eb4fe0c to
ff7662c
Compare
JLHwung
reviewed
Nov 22, 2019
| rm -f packages/babel-runtime/helpers/**/*.js | ||
| rm -f packages/babel-runtime-corejs2/helpers/**/*.js | ||
| rm -f packages/babel-runtime-corejs3/helpers/**/*.js | ||
| rm -rf packages/babel-runtime-corejs2/core-js |
Contributor
There was a problem hiding this comment.
nit: I think we should also clean packages/babel-runtime-corejs3/core-js(-stable)?.
existentialism
approved these changes
Nov 22, 2019
Member
Author
|
@JLHwung Why isn't the package.json enough? |
|
@nicolo-ribaudo native ESM in Node.js requires the file extension to be in the import specifier: https://nodejs.org/api/esm.html#esm_mandatory_file_extensions |
Member
Author
|
Thanks, I reopened the issue |
This was referenced Dec 12, 2019
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.
Currently
esm/helpers are broken: when you try to nativelyimportthem, they are parsed as scripts and thus throw an error.Assing
type: moduleis a better fix than renaming the files to*.mjs, because this isn't a breaking change.I only tested this PR manually because: