feat(legacy)!: bump modern target to support async generator #11896
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.
Description
After this PR, browsers that doesn't support async generators now runs on legacy chunks.
Plugin-legacy fails to build when the source code included async generators. The reason why this happens is because esbuild doesn't support transpiling async generators. (#11835)
Async generators is supported by
edge79, firefox55, chrome63, safari12
. The modern target we use currently ises2020, edge79, firefox67, chrome64, safari11.1
.If we changed
safari11.1
tosafari12
, we can avoid transpiling on modern chunks and the build will pass.Because Safari 11.1 is only used by 0.01%, I think it's fine to bump the target.
I tested this with Safari 11.1, 12.1, Chrome 62, 63, 64, IE11.
close #11835
Additional context
I fixed a bug that I found during implementing this. 5ac8417
When
import.meta
is not used in the source code, the code was running twice (once with modern chunks and once with legacy chunks) on Chrome 63.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).