Cloudflare Vite plugin now supports TanStack Start
The Cloudflare Vite plugin now supports TanStack Start applications. You can create new projects or migrate existing TanStack Start projects to use the plugin via the create-cloudflare CLI and configuration updates.
The Cloudflare Vite plugin now supports TanStack Start ↗ apps. Get started with new or existing projects.
New projects
Create a new TanStack Start project that uses the Cloudflare Vite plugin via the create-cloudflare CLI:
npm create cloudflare@latest -- my-tanstack-start-app --framework=tanstack-startyarn create cloudflare my-tanstack-start-app --framework=tanstack-startpnpm create cloudflare@latest my-tanstack-start-app --framework=tanstack-start
Existing projects
Migrate an existing TanStack Start project to use the Cloudflare Vite plugin:
- Install
@cloudflare/vite-pluginandwrangler
npm i -D @cloudflare/vite-plugin wrangleryarn add -D @cloudflare/vite-plugin wranglerpnpm add -D @cloudflare/vite-plugin wranglerbun add -d @cloudflare/vite-plugin wrangler
- Add the Cloudflare plugin to your Vite config
import { defineConfig } from "vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
import { cloudflare } from "@cloudflare/vite-plugin";
export default defineConfig({
plugins: [
cloudflare({ viteEnvironment: { name: "ssr" } }),
tanstackStart(),
viteReact(),
],
});
- Add your Worker config file
{
"$schema": "./node_modules/wrangler/config-schema.json",
"name": "my-tanstack-start-app",
// Set this to today's date
"compatibility_date": "2026-07-24",
"compatibility_flags": [
"nodejs_compat"
],
"main": "@tanstack/react-start/server-entry"
}"$schema" = "./node_modules/wrangler/config-schema.json"
name = "my-tanstack-start-app"
# Set this to today's date
compatibility_date = "2026-07-24"
compatibility_flags = [ "nodejs_compat" ]
main = "@tanstack/react-start/server-entry"
- Modify the scripts in your
package.json
{
"scripts": {
"dev": "vite dev",
"build": "vite build && tsc --noEmit",
"start": "node .output/server/index.mjs",
"preview": "vite preview",
"deploy": "npm run build && wrangler deploy",
"cf-typegen": "wrangler types"
}
}
See the TanStack Start framework guide for more info.
Source: original entry ↗
More from Cloudflare
Follow Cloudflare to get its new changes in your feed and email digest.
Cloudflare One Client for Windows hotfix - trusted certificate chains
A new GA release for Windows Cloudflare One Client is available, addressing an issue with building trusted certificate chains.
Cloudflare One Client for macOS - Trusted Certificate Chain Fix
A new GA release of the macOS Cloudflare One Client is available. This hotfix addresses an issue with building trusted certificate chains.
Cloudflare One Client for Linux
A new GA release of Cloudflare One Client for Linux is now available. This hotfix addresses an issue with building trusted certificate chains.