Skip to content

fix(pages): build the generated browser entry only for the client - #937

Open
hyfdev wants to merge 1 commit into
mainfrom
fix/pages-client-environment
Open

hyfdev wants to merge 1 commit into
mainfrom
fix/pages-client-environment

Conversation

@hyfdev

@hyfdev hyfdev commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

React, Svelte, and Solid Pages apps upload their browser entry, pages-client.js, and the code only it uses as part of the Worker, though nothing in the Worker imports it.

The browser entry is now built only for the client, and the Worker upload shrinks:

Adapter Worker upload, raw Gzip
React 1515 KiB → 908 KiB 319 KiB → 201 KiB
Svelte 431 KiB → 368 KiB 113 KiB → 97 KiB
Solid 490 KiB → 426 KiB 124 KiB → 108 KiB

These are wrangler deploy --dry-run sizes for the repo's playgrounds.

These three adapters add the browser entry to the top-level build.rollupOptions.input, which Vite applies to every environment.

Vue already sets it under environments.client and is unchanged.

Moving the three adapters' input under environments.client instead overrides a user's own client manifest and input settings, so Void drops the generated input from the other environments and leaves the adapters' config as it is.

Client builds and manifests stay the same.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-pages-client-environment-void-cloud.voidzero-docs.workers.dev (commit b2c7dc7)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://cef29e93-void-cloud.voidzero-docs.workers.dev b2c7dc7 2026-11-27T00:30:30.479Z Visit the dashboard ↗

@hyfdev
hyfdev marked this pull request as ready for review November 27, 2026 00:40
Copilot AI balanced review requested due to automatic review settings November 27, 2026 00:40

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

This branch has not been deployed

No deployments
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.

2 participants