Skip to content

fix(build): honor build.minify in framework Workers - #1017

Merged
cpojer merged 3 commits into
mainfrom
fix/framework-minify-opt-out
Dec 3, 2026
Merged

cpojer merged 3 commits into
mainfrom
fix/framework-minify-opt-out

Conversation

@hyfdev

@hyfdev hyfdev commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Fixes #1016

Void sets build.minify: true for the React Router, TanStack Start and vinext server environments.

It now does that only when the app sets build.minify neither at the root nor in that environment.

Before, Void's value replaced the app's, so turning minification off had no effect.

React Router, environments.ssr.build.minify: false main this PR
Worker JavaScript minified, 428,963 bytes not minified, 986,488 bytes
Thrown error To: … ProbeNamedError: …

Builds that don't set build.minify are unchanged.

One setting now behaves differently.

With build.minify: 'esbuild' only in ssr, the value now reaches Vite as written.

Vite then runs no minifier, because it adds esbuild only from the root setting.

On main, Void replaced it with Oxc.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Cloudflare builds and deploys previews for this pull request. Learn more about Cloudflare previews.

Worker Status Deployment Commit
void-cloud Deployed Preview b6e3d8f

Updated: Dec 3, 2026, 06:52 UTC | Dashboard

@hyfdev
hyfdev marked this pull request as ready for review December 3, 2026 06:43
@hyfdev
hyfdev requested review from cpojer and a balanced review from Copilot December 3, 2026 06:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the changes preserving app-configured framework Worker minification.

No open issues 🎉

What changed in this PR

Fixes #1016 by preserving app-configured minification for React Router, TanStack Start, and vinext Workers while retaining minification by default.

Changes:

  • Respect root and environment-level build.minify settings.
  • Add regression tests for defaults and explicit minifier settings.
  • Document how to disable framework server minification.
File Description
packages/​void/​test/​unit/​framework-worker-minify.test.ts Tests defaults and explicit minification options.
packages/​void/​src/​index.ts Applies framework minification defaults only when unset.
docs/​guide/​deployment.md Documents framework server minification controls.

Review effort: Balanced

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cpojer
cpojer merged commit 1100435 into main Dec 3, 2026
22 checks passed
@cpojer
cpojer deleted the fix/framework-minify-opt-out branch December 3, 2026 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build.minify is ignored in React Router, TanStack Start and vinext Workers

3 participants