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.
Fixes #5234.
Closes #5235.
This pull request allows packages to import from dependencies who export a
mjs
file (instead of us giving a URL).It also ensures that a user who uses
mjs
in their application gets a file.I'm really getting tired of all of these
mjs
hacks, because now we "sort of" supportmjs
. e.g.:If a user defines their
module
field inpackage.json
asindex.mjs
and then explicitly import files with.mjs
instead of being extensionless, we'll keep loading them.I wonder if we can somehow tell webpack to not use
module
if the field ismjs
? That would prevent this hack.