-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
fix(plugin-legacy): respect modernTargets option if renderLegacyChunks disabled #15789
Conversation
Run & review this pull request in StackBlitz Codeflow. |
48101c3
to
50b5fdb
Compare
The cause of the failing build pipeline seems unrelated to the changes to me. |
Converted this a draft PR because this does not seem to be sufficient to fix the issue. |
50b5fdb
to
2e80e8a
Compare
This seems to be working now (at least for our use case). |
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
@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 |
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. |
Description
Fixes #15788 .
If
modernPolyfills
is set totrue
, butrenderLegacyChunks
is set to false,genLegacy
will be false and we would return early. If this return happens beforemodernTargets
is 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
modernTargets
in #15506.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).