fix(plugin-legacy): respect modernTargets option if renderLegacyChunks disabled#15789
Merged
bluwy merged 1 commit intovitejs:mainfrom Mar 8, 2024
Merged
fix(plugin-legacy): respect modernTargets option if renderLegacyChunks disabled#15789bluwy merged 1 commit intovitejs:mainfrom
bluwy merged 1 commit intovitejs:mainfrom
Conversation
|
|
48101c3 to
50b5fdb
Compare
Contributor
Author
|
The cause of the failing build pipeline seems unrelated to the changes to me. |
Contributor
Author
|
Converted this a draft PR because this does not seem to be sufficient to fix the issue. |
50b5fdb to
2e80e8a
Compare
Contributor
Author
|
This seems to be working now (at least for our use case). |
jgosmann
commented
Feb 3, 2024
bluwy
reviewed
Feb 6, 2024
9 tasks
If `modernPolyfills` is set to `true`, but `renderLegacyChunks` is set to false, `genLegacy` will be false and we would return early. If this return happens before `modernTargets` is initialized, the modern polyfills will be generated with the wrong (the default?) target instead of the specified `modernTargets`.
2e80e8a to
3fc1068
Compare
Contributor
Author
|
@bluwy I hope you don't mind pinging you. Can we get this merged? Then we would no longer to have to patch this directly in our |
Member
|
Sorry I've forgot to follow up on this. No worries on pinging me 👍 This looks good to me. I'll leave this open for awhile if anyone else wants to review this, but otherwise I'll merge and cut a release for this by the end of the day. |
bluwy
approved these changes
Mar 8, 2024
patak-cat
approved these changes
Mar 8, 2024
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.
Description
Fixes #15788 .
If
modernPolyfillsis set totrue, butrenderLegacyChunksis set to false,genLegacywill be false and we would return early. If this return happens beforemodernTargetsis initialized, the modern polyfills will be generated with the wrong (default?) target instead of the specifiedmodernTargets.Additional context
#14527 is related and lead to the introduction of
modernTargetsin #15506.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).