Skip to content

fix(pages): skip static page-data requests in development - #710

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
niteshseram:fix/dev-static-page-data
Nov 4, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
niteshseram:fix/dev-static-page-data

Conversation

@niteshseram

Copy link
Copy Markdown
Contributor

With output: "static", client navigation in development tries to fetch generated page-data files that the dev server does not serve:

GET /_void/pages/contact.json → 404
GET /contact                 → 200 (X-VoidPages)

The page loads through the server fallback, but the failed request adds a network round trip. Prefetching follows the same path.

Cause

The shared Pages plugin passes resolveStaticPageDataBuildOptions() to client generation in both development and production. That function enables static page data whenever output === "static", although the JSON files are only generated during the production build.

Fix

Pass { enabled: false, fastPath: false } when generating a development client. Production clients continue to use the existing build options, preserving static JSON fetching and routing-rule checks

@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.

👍

@cpojer
cpojer merged commit 392907e into voidzero-dev:main Nov 4, 2026
2 checks passed
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