Conversation
BPScott
force-pushed
the
fix-worker-urls-with-terser
branch
2 times, most recently
from
October 1, 2026 01:37
4c4ccf3 to
e8e8743
Compare
Worker urls generated in the server build must match the filenames created in the client build. This worked with the default minifier, but did not work when explictly using terser as the minifier for client builds. This was because the terser plugin did not read its minification options from the per-environment config.
BPScott
force-pushed
the
fix-worker-urls-with-terser
branch
from
October 1, 2026 01:38
e8e8743 to
1cca8e3
Compare
This branch has not been deployed
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.
Worker urls generated in the server build must match the filenames created in the client build. This worked with the default minifier, but did not work when explicitly using terser as the minifier for client builds. This was because the terser plugin did not read its minification options from the per-environment config.
This PR updates the terser plugin to read from the per-environment config rather than the top-level config.
Review with whitespace disabled - most of the change is reformatting of the test case.
See #21871 for prior art that fixed a regression in this behaviour when using the default minifier.
I found this bug in v7.3.5, but I'm not expecting a backport. (for now I'm applying this change as a patch-package while I work through the Vite 8 update).
AI Disclosure: I used Claude to identify this problem, and author the fix and test case. Code has been reviewed by me, and the commit message / PR description is human authored.