Meta-Frameworks
Use your framework’s routes and rendering with Void’s database, storage, and deployment.
Add voidPlugin() to the framework’s Vite config. TanStack Start and React Router use the Cloudflare plugin included with Void. SvelteKit, Nuxt, Analog, and Astro use their own Cloudflare integrations.
Supported Frameworks
| Framework | Package | Integration |
|---|---|---|
| TanStack Start | @tanstack/react-start | Vite plugin composition. voidPlugin() runs alongside the framework plugin. |
| React Router v7 | @react-router/dev | Vite plugin composition. Setup matches TanStack Start. |
| SvelteKit | @sveltejs/kit | Vite-based, uses its own Cloudflare adapter |
| Nuxt | nuxt | Own CLI and build toolchain |
| Analog | @analogjs/platform | Vite-based, uses Nitro with Cloudflare preset |
| Astro v7+ | astro | Own CLI and Cloudflare adapter (v7 required) |
Detection is automatic. The CLI reads your package.json dependencies.
In vinext apps, middleware.ts and proxy.ts also apply to files in public/. When either file is present, static requests go through the Worker and count toward its request usage. Apps without middleware keep static asset delivery.
Feature Support
- Binding inference: D1, KV, R2, AI, and queues are detected from source code.
- Typed database: query types come from your Drizzle schema.
- Migrations: local D1 is updated on dev startup, and migrations are validated and deployed with
void deploy. - Runtime helpers:
void/db,void/kv,void/storage, andvoid/aigive you typed access to Cloudflare bindings in dev and production. - Environment variables: TanStack Start, React Router, and vinext support validated values from
void/env. - Auth: Use Better Auth’s integration for your framework.
- Cron jobs: scheduled handlers via the
crons/directory. - Queue consumers: typed producers and consumers via the
queues/directory. - Revalidation and prerendering: configure them with
routing.revalidateandrouting.prerenderinvoid.config.ts.
To test a queue consumer in vinext, start the dev server and use the manual queue trigger with the port it prints and the token in .void/dev-trigger-token. Calling send() in dev or preview accepts the message without running the local consumer. Keep queues/ and env.ts as they were at build time when using preview.
For framework apps, Void revalidation caches public HTML document responses with both void deploy and void deploy --platform cloudflare. Client data requests continue to use the framework's own behavior. A response with Set-Cookie or Cache-Control: private, no-store, or no-cache is never shared.
Frameworks can also access bindings directly via the framework's own mechanisms (e.g. env from cloudflare:workers in SvelteKit 3, Analog, and Astro, platform.env in SvelteKit 2, event.context.cloudflare.env in Nuxt).
Configuration
Environment variables
In TanStack Start, React Router, and vinext, import env from void/env to read values validated by your env.ts schema. Defaults, type conversions, and async validators work in both development and production.
Reading a missing or invalid value throws an error. Requests that do not read that value can still run. For other frameworks, use the framework's environment API.
void.config.ts
Most configuration is inferred automatically. Use void.config.ts to override defaults or fine-tune behavior:
import { defineConfig } from 'void/config';
export default defineConfig({
inference: {
build: 'nuxt build',
scanDirs: ['src', 'server', 'lib'],
bindings: { db: 'MY_DB' },
},
routing: {
prerender: ['/', '/about', '/pricing'],
revalidate: 60,
},
});| Field | Purpose |
|---|---|
inference.build | Override the default build command |
inference.scanDirs | Directories to scan for binding inference (defaults vary by framework) |
routing.prerender | Paths to prerender as static HTML at deploy time |
routing.revalidate | Default revalidation TTL in seconds for cached responses |
inference.bindings | Enable, disable, or rename an inferred binding. |
routing.notFound | Configure unmatched routes in SvelteKit, Nuxt, Analog, or Astro directly. |
See Configuration for the full reference.
Cloudflare settings
Frameworks that use Cloudflare's dev runtime need their adapters pointed at Void's generated .void-wrangler.jsonc. Their setup guides show the adapter options. Define your Cloudflare settings in void.config.ts:
import { defineConfig } from 'void/config';
export default defineConfig({
cloudflare: {
name: 'my-app',
compatibility_date: '2026-02-24',
compatibility_flags: ['nodejs_compat'],
},
});For a project connected directly to Cloudflare, Workers AI runs remotely in development. Sign in to Cloudflare to use it.
Void combines these settings with inferred bindings and records provisioned resource IDs in void.lock.json. Commit both files.
Deployment
Run void deploy to build with your framework and deploy to the selected target. See Deployment for setup and CI.