Skip to content

Commit 255f32f

Browse files
committed
TanStack Start changelog
1 parent c5a4e2c commit 255f32f

File tree

4 files changed

+85
-6
lines changed

4 files changed

+85
-6
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: TanStack Start framework support
3+
description: TanStack Start can now be used with the Cloudflare Vite plugin
4+
products:
5+
- workers
6+
date: 2025-10-24
7+
---
8+
9+
import { PackageManagers, WranglerConfig } from "~/components";
10+
11+
[TanStack Start](https://tanstack.com/start/) can now be used with the [Cloudflare Vite plugin](/workers/vite-plugin/).
12+
13+
## Create a new project
14+
15+
You can create a new project using the `create-cloudflare` CLI:
16+
17+
<PackageManagers
18+
type="create"
19+
pkg="cloudflare@latest"
20+
args="my-tanstack-start-app --framework=tanstack-start"
21+
/>
22+
23+
## Migrate an existing project
24+
25+
Migrating an exiting project is also straightforward.
26+
27+
1. Install `@cloudflare/vite-plugin` and `wrangler`
28+
29+
<PackageManagers type="add" pkg="@cloudflare/vite-plugin wrangler" dev />
30+
31+
2. Add the Cloudflare plugin to your Vite config
32+
33+
```ts {4, 8} title="vite.config.ts"
34+
import { defineConfig } from "vite";
35+
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
36+
import viteReact from "@vitejs/plugin-react";
37+
import { cloudflare } from "@cloudflare/vite-plugin";
38+
39+
export default defineConfig({
40+
plugins: [
41+
cloudflare({ viteEnvironment: { name: "ssr" } }),
42+
tanstackStart(),
43+
viteReact(),
44+
],
45+
});
46+
```
47+
48+
3. Add your Worker config file
49+
50+
<WranglerConfig>
51+
52+
```toml
53+
name = "my-tanstack-start-app"
54+
compatibility_date = "2025-10-11"
55+
compatibility_flags = ["nodejs_compat"]
56+
main = "@tanstack/react-start/server-entry"
57+
```
58+
59+
</WranglerConfig>
60+
61+
4. Modify the scripts in your `package.json`
62+
63+
```json title="package.json"
64+
{
65+
"scripts": {
66+
"dev": "vite dev",
67+
"build": "vite build && tsc --noEmit",
68+
// ============ 👇 remove this line ============
69+
"start": "node .output/server/index.mjs",
70+
// ============ 👇 add these lines ============
71+
"preview": "vite preview",
72+
"deploy": "npm run build && wrangler deploy",
73+
"cf-typegen": "wrangler types"
74+
}
75+
}
76+
```
77+
78+
See the [TanStack Start framework guide](/workers/framework-guides/web-apps/tanstack-start/) for more info.

src/content/docs/workers/vite-plugin/get-started.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { PackageManagers, WranglerConfig } from "~/components";
1010

1111
:::note
1212
This guide demonstrates creating a standalone Worker from scratch.
13-
If you would instead like to create a new application from a ready-to-go template, refer to the [React Router](/workers/framework-guides/web-apps/react-router/), [React](/workers/framework-guides/web-apps/react/) or [Vue](/workers/framework-guides/web-apps/vue/) framework guides.
13+
If you would instead like to create a new application from a ready-to-go template, refer to the [TanStack Start](/workers/framework-guides/web-apps/tanstack-start/), [React Router](/workers/framework-guides/web-apps/react-router/), [React](/workers/framework-guides/web-apps/react/) or [Vue](/workers/framework-guides/web-apps/vue/) framework guides.
1414
:::
1515

1616
## Start with a basic `package.json`

src/content/docs/workers/vite-plugin/index.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@ Your Worker code runs inside [workerd](https://github.com/cloudflare/workerd), m
1414
- Uses the Vite [Environment API](https://vite.dev/guide/api-environment) to integrate Vite with the Workers runtime
1515
- Provides direct access to [Workers runtime APIs](/workers/runtime-apis/) and [bindings](/workers/runtime-apis/bindings/)
1616
- Builds your front-end assets for deployment to Cloudflare, enabling you to build static sites, SPAs, and full-stack applications
17-
- Official support for [React Router v7](https://reactrouter.com/) with server-side rendering
17+
- Official support for [TanStack Start](https://tanstack.com/start/) and [React Router v7](https://reactrouter.com/) with server-side rendering
1818
- Leverages Vite's hot module replacement for consistently fast updates
1919
- Supports `vite preview` for previewing your build output in the Workers runtime prior to deployment
2020

2121
## Use cases
2222

23-
- [React Router v7](https://reactrouter.com/) (support for more full-stack frameworks is coming soon)
23+
- [TanStack Start](https://tanstack.com/start/)
24+
- [React Router v7](https://reactrouter.com/)
2425
- Static sites, such as single-page applications, with or without an integrated backend API
2526
- Standalone Workers
2627
- Multi-Worker applications
2728

2829
## Get started
2930

30-
To create a new application from a ready-to-go template, refer to the [React Router](/workers/framework-guides/web-apps/react-router/), [React](/workers/framework-guides/web-apps/react/) or [Vue](/workers/framework-guides/web-apps/vue/) framework guides.
31+
To create a new application from a ready-to-go template, refer to the [TanStack Start](/workers/framework-guides/web-apps/tanstack-start/), [React Router](/workers/framework-guides/web-apps/react-router/), [React](/workers/framework-guides/web-apps/react/) or [Vue](/workers/framework-guides/web-apps/vue/) framework guides.
3132

3233
To create a standalone Worker from scratch, refer to [Get started](/workers/vite-plugin/get-started/).
3334

src/content/docs/workers/vite-plugin/reference/vite-environments.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ For more information about Vite's configuration options, see [Configuring Vite](
6060

6161
The default behavior of using the Worker name as the environment name is appropriate when you have a standalone Worker, such as an API that is accessed from your front-end application, or an [auxiliary Worker](/workers/vite-plugin/reference/api/#interface-pluginconfig) that is accessed via service bindings.
6262

63-
## React Router v7
63+
## Full-stack frameworks
6464

65-
If you are using the Cloudflare Vite plugin with [React Router v7](https://reactrouter.com/), then your Worker is used for server-side rendering and tightly integrated with the framework.
65+
If you are using the Cloudflare Vite plugin with [TanStack Start](https://tanstack.com/start/) or [React Router v7](https://reactrouter.com/), then your Worker is used for server-side rendering and tightly integrated with the framework.
6666
To support this, you should assign it to the `ssr` environment by setting `viteEnvironment.name` in the plugin config.
6767

6868
```ts title="vite.config.ts"

0 commit comments

Comments
 (0)