Skip to content

fix(deploy): create void.config.ts on the first direct Cloudflare deploy - #954

Merged
cpojer merged 2 commits into
mainfrom
fix/fresh-cloudflare-config
Nov 28, 2026
Merged

cpojer merged 2 commits into
mainfrom
fix/fresh-cloudflare-config

Conversation

@hyfdev

@hyfdev hyfdev commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Running void deploy --platform cloudflare in a new TanStack Start, React Router or vinext app, or in a Void app created without void init, fails while Vite loads its config:

Error: Found `wrangler.jsonc` but no `cloudflare.config.ts`. The Cloudflare Vite plugin no longer reads Wrangler configuration files, so this configuration would be ignored. Run `npx cf migrate --bundler vite` to generate `cloudflare.config.ts`.

Without a void.config.ts, deploy writes the Worker name and account to a root wrangler.jsonc, which the v2 Cloudflare Vite plugin rejects.

This has failed since Void 1.5.0.

Running void connect --platform cloudflare first avoids it, because deploy then migrates the root file that connect wrote before the build starts.

Deploy now writes a minimal void.config.ts with the Worker name and compatibility date before it creates any resources, so a retry after an interrupted first deploy reuses them.

A project with saved deploy state but no config, or with both a void.config.ts and a root wrangler.jsonc left by an earlier failed deploy, now stops with instructions to recover.

Projects that already have a config, Nuxt, Analog, Astro, SvelteKit, static deploys and deploys to a Void platform are unchanged.

Related to #445.

Fixes #957

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-fresh-cloudflare-config-void-cloud.voidzero-docs.workers.dev (commit 5063022)

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://8a0fb813-void-cloud.voidzero-docs.workers.dev 5063022 2026-11-28T09:23:37.222Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b6a3b0f0-void-cloud.voidzero-docs.workers.dev d6af9bc 2026-11-28T08:22:40.936Z Visit the dashboard ↗

@hyfdev
hyfdev marked this pull request as ready for review November 28, 2026 08:38
Copilot AI balanced review requested due to automatic review settings November 28, 2026 08:38

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.

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

Nice fix!

@cpojer
cpojer merged commit b302a04 into main Nov 28, 2026
22 checks passed
@cpojer
cpojer deleted the fix/fresh-cloudflare-config branch November 28, 2026 09:27
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.

The first void deploy --platform cloudflare fails in apps without void.config.ts

3 participants