You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
void deploy --platform cloudflare ignores inference.appType: "void" and refuses a VitePress site with a backend #885
Void: 1.11.0, and the same code on main (92a0156). VitePress 2.0.0-alpha.21, Node 26.12.1, macOS 27.
The guide's Adding a backend to a static site says to set inference.appType: "void" so that a project with both VitePress and routes/ deploys both. With --platform cloudflare, the setting is ignored, and the deploy refuses with the message that tells you to set it.
Plus .vitepress/config.ts and index.md. Then void deploy --platform cloudflare:
deploy: "vitepress" was detected, but this project also has backend code: routes/.
A static deploy would silently drop it, so Void will not guess. Pick one in void.config.ts:
Deploy the static output only (the backend is NOT deployed):
{ "inference": { "appType": "static" } }
Deploy both — the SSG emits the site, then Void packages it with the worker:
{ "inference": { "appType": "void", "build": "<ssg> build && vite build" } }
...and in vite.config.ts add voidPlugin() plus `publicDir: "<ssg output dir>"`,
so the generated site is copied into the client build alongside the worker.
Controls, each run with no Cloudflare credentials:
With vitepress removed from package.json, the deploy passes this check and stops at the next step ("Cloudflare authentication is required").
With appType: "static", it passes too. So void.config.ts is read.
The same refusal comes with VitePress in docs/ (vitepress build docs).
Why
resolveCloudflareStaticPreset first takes resolveStaticDeployPreset's answer, which is null for appType: "void". Then, with no framework detected, it calls detectPreset(root, { strictBackend: true }) without looking at voidConfig.inference?.appType.
The platform path checks it first (if (!preset && !voidConfig.inference?.appType)). Its comment, and the strictBackend tests, say the guard is for the unconfigured path only: a configured inference.appType is "the user stating their intent". No test covers resolveCloudflareStaticPreset with appType set.
A possible fix
In resolveCloudflareStaticPreset, skip the strict detection when an app type is configured, as the platform path does. "static" and "spa" have already returned by then, so only "void" and "framework" reach it, and both mean a full Worker deploy:
Activity
fix(deploy): honor a configured inference.appType in the Cloudflare s… (