Skip to content

fix(pages): prebundle shared client runtime - #634

Closed
yangshun wants to merge 1 commit into
voidzero-dev:mainfrom
yangshun:codex/fix-pages-client-prebundle
Closed

yangshun wants to merge 1 commit into
voidzero-dev:mainfrom
yangshun:codex/fix-pages-client-prebundle

Conversation

@yangshun

@yangshun yangshun commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Pages virtual client entries import void/pages-client and void/pages-prefetch, but these modules are absent from the initial dependency crawl. Late optimization can trigger a full reload during hydration or interaction. Prebundle both entries at startup in the React, Vue, Svelte, and Solid adapters.

Add integration coverage that runs the real Vite optimizer with dependency discovery disabled and checks that both runtime bundles exist before the first browser request. The React regression fails on the original configuration and passes with this change.

This addresses a prebundling gap found while investigating the prepublish browser timeout. The original timeout did not reproduce locally, so this does not establish its cause or attribute it to PR #632.

Validation on macOS with Node 24.22.1 and npm 12.2.1:

  • vp run build:all: 41 tasks passed.
  • vp run check: 33 tasks passed.
  • vp test run --maxWorkers=4: 15,077 tests passed; 31 skipped.
  • Full packed npm + Vite+ React acceptance passed.
  • Full packed npm acceptance passed for React, Vue, Svelte, and Solid.
  • Focused formatting, lint, and diff checks passed.

Linux comparison of the original failing command (VOID_PACKED_SUITE=full VOID_PACKED_PM=npm VOID_PACKED_FRAMEWORK=react VOID_PACKED_TOOLCHAIN=vite-plus node .github/scripts/packed-consumer.mjs):

Revision Result Elapsed
Before: 588703d4f Passed 140 seconds
After: a0ebb4d4a Passed 237 seconds

Both ran in the same Ubuntu 24.04 Linux x64 container under emulation on an arm64 Mac, using Node 24.22.1, npm 12.2.1, and consumer Vite+ 1.4.0. The test and lockfile hashes matched; all 548 external dependency entries, versions, and integrity values matched. These were single runs, not a performance benchmark.

The subsequent full prepublish run on main 63b0d91cc also passed the npm + Vite+ React browser check without this change. The original CI timeout has not been reproduced, and there is no failing-before/passing-after evidence that this PR resolves it.

The before run's dev-server log shows void/pages-prefetch and void/pages-client optimized separately, followed by optimized dependencies changed. reloading. The after run has no such startup reload. This demonstrates the startup behavior change while both complete browser tests still pass.

@yangshun yangshun closed this Oct 29, 2026
@yangshun
yangshun deleted the codex/fix-pages-client-prebundle branch October 29, 2026 08:19
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.

1 participant