Repository navigation
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-minify-void-worker-void-cloud.voidzero-docs.workers.dev (commit d57f11e)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
cpojer
requested changes
Nov 30, 2026
cpojer
left a comment
Member
There was a problem hiding this comment.
Issue: A later configEnvironment hook that sets output.minify: false still loses @license comments after this change. If the hook sets minify: true, Void swaps in its own name-preserving settings even though the plugin explicitly opted into normal minification. Let's apply the defaults only when the app and its Vite plugins leave minification unset.
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.
Since #188, Workers in Void apps without a meta framework haven't been minified by default.
Now they are, and function and class names are kept.
JavaScript in a production Worker build, in bytes (each file gzipped, then added up):
#188 moved these apps' Worker from Vite's
ssrenvironment tovoid_worker, but Void'sminify: truestayed onssr.Code can depend on function and class names, as in this error from an API route added to the Vue starter, along with two test pages:
minifynot setDerivedError: …DerivedError: …build: { minify: true }l: …l: …With
minifynot set, the stack position of another error thrown in that route moves from14:8to1:342.The Worker build's source maps, already on by default, place both at line 10 of the route's source.
environments.void_worker(outputisbuild.rolldownOptions.output)build.minifynoroutput.minifyis setoutput.commentssays otherwise; function and class names kept, except#privatenamesoutput.keepNames: falsebuild.minifyoroutput.minify, such asbuild.minify: falseAuxiliary Workers, and apps with
output: 'static'invoid.config.ts, don't change.Fixes #980.