Repository navigation
Conversation
Fixes voidzero-dev#599 ## Summary In `@void/react` Pages apps, the worker environment already crawls `pages/**` via `optimizeDeps.entries`, but the client environment only gets `include: CLIENT_OPTIMIZE_DEPS`. On a cold Vite cache the client scanner therefore finds no dependencies, discovers page imports (and the virtual `void/pages-prefetch` module) while serving the first page, and forces a full reload (`optimized dependencies changed. reloading`). ## Changes - Set client `optimizeDeps.entries` to the same pages glob as the worker, excluding `*.server.*` companions. - Add `void/pages-prefetch` to client `optimizeDeps.include` (imported only from the virtual client entry, so the scanner cannot see it). ## Testing - `pnpm exec vp test run packages/react/test/unit/plugin-pages.test.ts` (30 passed; asserts client entries + `void/pages-prefetch` include)
…iles - Include void/pages-client, which only the virtual islands entry imports, so an island page does not reload on a cold first load. - Leave island pages and __tests__ out of the client scan entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@codex review |
766bd4b to
08a1f46
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #599
Summary
In
@void/reactPages apps, the worker environment already crawlspages/**viaoptimizeDeps.entries, but the client environment only getsinclude: CLIENT_OPTIMIZE_DEPS. On a cold Vite cache the client scanner therefore finds no dependencies, discovers page imports (and the virtualvoid/pages-prefetchmodule) while serving the first page, and forces a full reload (optimized dependencies changed. reloading).Changes
optimizeDeps.entriesto the same pages glob as the worker, excluding*.server.*companions.void/pages-prefetchto clientoptimizeDeps.include(imported only from the virtual client entry, so the scanner cannot see it).Testing
pnpm exec vp test run packages/react/test/unit/plugin-pages.test.ts(30 passed; asserts client entries +void/pages-prefetchinclude)🐸