Repository navigation
Track Cloudflare Vite plugin v2 typed config and native Build Output support #445
Description
Cloudflare Vite plugin 2.0.0-beta.v.0 introduces typed Cloudflare configuration and native Build Output. Void 1.1.11 currently passes generated Wrangler configuration through configPath and later reads dist/{ssr,rsc,server}/wrangler.json. A dependency override alone cannot preserve these contracts.
Inspected Void source: https://github.com/voidzero-dev/void/tree/134a2ee5052458242e15273c0db6aecaa5760249
Inspected published Cloudflare package: @cloudflare/vite-plugin@2.0.0-beta.v.0, declaring @cloudflare/build-output-utils@0.9.2.
The adapter needs to address these boundaries:
- Root config: v2 loads cloudflare.config.ts and no longer accepts configPath. Its Worker config callback does not carry root accountId, complianceRegion or containers. A Worker-only bridge would drop root settings.
- Worker config: the typed schema uses entrypoint, compatibilityDate, typed env and exports rather than Wrangler main, compatibility_flags, vars, d1_databases and durable_objects. Preserve authored binding IDs and precedence, required secrets, flag deduplication and Durable Object migration metadata.
- Artifact consumption: v2 writes .cloudflare/output/v0 directly, with partial module manifests and additional module types. Preparation, publish validation, preview and prerender should consume the same immutable native artifact through the public utilities. Keep the v1 converter independently tested if v1 remains supported.
- Metadata: preserve the original build mode and account selection, including explicit target-account mismatch validation.
Acceptance cases:
- An app without optional services builds and previews from native v2 output without credentials or paid bindings.
- A custom TanStack entry preserves default handlers and named Durable Object/Workflow exports in development and production.
- Bindings, secret declarations, flags, asset routing, migration history, queues and root account/container settings survive exactly once.
- Additional text/binary/Wasm module types, assets and build metadata survive preparation and publication of the same immutable artifact.
- Preview/prerender, framework artifact checks and packed-consumer checks pass across supported systems.
- Existing real cf --prebuilt --dry-run coverage passes without publication. Credentialed deployment tests remain a separate gate.
This is a source-level compatibility assessment. No v2 app deployment or authenticated provider operation was attempted. The inspected beta still contains CLOUDFLARE_CF_AUTH and CLOUDFLARE_AUTH_USE_KEYRING; no auth-flag rename is indicated by these sources.
Implementation progress
Native Build Output preparation is implemented in PR #444. The public converter consumes the standard v2 artifact, completes module manifests with the standard reader, preserves original metadata and module/asset bytes, and leaves the input unchanged. The final upstream test suite passed 13,554 tests; packed React consumer checks passed for npm/pnpm with plain Vite and Vite+. A real Vite plugin 2.0.0-beta.v.0 build also passed converter preparation and cf prebuilt dry-run.
This does not complete the full migration. Void's internal plugin configuration and artifact consumers still need to switch to v2. The fixed configuration-file location remains a separate framework integration prerequisite: the Worker callback alone cannot provide root account settings and Containers. This issue stays open for that configuration boundary, native preview/prerender/publication consumers, and application-level migration verification.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
fix: preserve custom TanStack Worker entries and prepare native Cloud…