Makes explicit imports that rely on index file inference #2368
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.
Partially resolves #2277 in combination with #2364
There are some import paths that rely on the bundler to resolve
./somefolder
to./somefolder/index.js
at build time. This doesn't play well with the es module spec which demands import paths be complete.Adding
/index
to these import statements (which only exist in the rootindex.js
file) is minimally invasive and has no adverse effects on any of the existing builds but opens the door to a trivial transformation which adds.es.js
extensions to import paths in order to generate a fully esm compatible build from source.Since the project became dependency free the only manual edit to the source after this PR (in order to unlock browser esm compatibility) is to remove the unprotected use of
process.env
. I could pull in the changes from that commit to this PR or make a separate PR.After that.. the babel transform (which exists here) would be all that is required.