Enable ESM module version of AMP Runtime and Components by default#1140
Merged
sebastianbenz merged 2 commits intomainfrom Feb 12, 2021
Merged
Enable ESM module version of AMP Runtime and Components by default#1140sebastianbenz merged 2 commits intomainfrom
sebastianbenz merged 2 commits intomainfrom
Conversation
This can be configured by the esmModulesEnabled flag, which is `true` by default.
patrickkettner
approved these changes
Feb 12, 2021
|
|
||
| #### `esmModulesEnabled` | ||
|
|
||
| Enables the smaller ESM module version of AMP runtime and components: |
Collaborator
There was a problem hiding this comment.
This is a bit ambiguous - is there a way to link to some kind of docs to explain this more?
Collaborator
Author
There was a problem hiding this comment.
Not yet - we should add one...once there's one.
| */ | ||
| class RewriteAmpUrls { | ||
| constructor(config) { | ||
| this.esmModulesEnabled = config.experimentEsm; |
Collaborator
There was a problem hiding this comment.
Since you aren't supporting the old version at all, this be a breaking change as far as semver is concerned, right?
Collaborator
Author
There was a problem hiding this comment.
Good question. My assumption is: the previous default was disabled, the new default is enabled.
Cases:
- If someone previously enabled it, it's still going to be enabled => not a breaking change
- If someone previously explicitly disabled it, it's going to be enabled now. This is in theory a breaking change, however, this is the new "official" default for AMP as it's valid AMP now. And the flag was named experimental + undocumented, so I wouldn't consider it part of the official API.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.