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
make extensions end in mjs file extension type #26340
Merged
Merged
Conversation
This file contains 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
rsimha
approved these changes
Feb 5, 2020
As discussed offline, I think this can be done more elegantly, by centralizing the file nomenclature in |
erwinmombay
force-pushed
the
amp-esm
branch
2 times, most recently
from
February 5, 2020 23:05
a9d454d
to
7b02ffe
Compare
erwinmombay
added a commit
that referenced
this pull request
Feb 11, 2020
* make extensions end in mjs file extension type * lint fixes * add test page * lint fixes * change names to mjs for calls to createModuleCompatibleES5Bundle * fix config not getting applied to the built main binaries * temp * add sourceMappingURL back since gulp-sourcemaps doesnt support it
erwinmombay
added a commit
that referenced
this pull request
Feb 11, 2020
* make extensions end in mjs file extension type * lint fixes * add test page * lint fixes * change names to mjs for calls to createModuleCompatibleES5Bundle * fix config not getting applied to the built main binaries * temp * add sourceMappingURL back since gulp-sourcemaps doesnt support it
erwinmombay
added a commit
that referenced
this pull request
Feb 18, 2020
* make extensions end in mjs file extension type * lint fixes * add test page * lint fixes * change names to mjs for calls to createModuleCompatibleES5Bundle * fix config not getting applied to the built main binaries * temp * add sourceMappingURL back since gulp-sourcemaps doesnt support it
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
when running
gulp dist --esm
we need to differentiate the modern js binaries from old generated binaries. We will suffix the file with.mjs
. The output has not been changedThe solution in this pR is not optimal as it checks calls
maybeToEsmName
a few many times. This can be optimized by plumbing through the option throughout all the calls but that will take me a bit more time which I'll do in a follow up PR.i'll also follow up with a PR to update a single example page with the mjs example. trying to do all of examples dynamically is more difficult since we only do string manipulation (we regex the url strings) while the mjs changes needs dom manipulation (needs to append multiple script tags and add attributes etc)