Skip to content

Commit 872c411

Browse files
authored
Merge branch 'main' into e2e-basic-spa
2 parents f50425b + d363dca commit 872c411

File tree

109 files changed

+285
-278
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+285
-278
lines changed

docs/router/framework/react/comparison.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Feature/Capability Key:
7171
| React Server Functions || 🛑 ||
7272
| React Server Function Middleware || 🛑 | 🛑 |
7373
| API Routes ||||
74-
| API Middleware || 🛑 ||
74+
| API Middleware || ||
7575
| React Server Components | 🛑 | 🟡 (Experimental) ||
7676
| `<Form>` API | 🛑 |||
7777

docs/start/framework/react/hosting.md

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ Once you've chosen a deployment target, you can follow the deployment guidelines
2020

2121
- [`cloudflare-workers`](#cloudflare-workers): Deploy to Cloudflare Workers
2222
- [`netlify`](#netlify): Deploy to Netlify
23+
- [`nitro`](#nitro): Deploy using Nitro
2324
- [`vercel`](#vercel): Deploy to Vercel
2425
- [`railway`](#nodejs--railway--docker): Deploy to Railway
25-
- [`nitro`](#using-nitro-v2): Deploy to a Nitro server
2626
- [`node-server`](#nodejs--railway--docker): Deploy to a Node.js server
2727
- [`bun`](#bun): Deploy to a Bun server
2828
- ... and more to come!
@@ -78,6 +78,8 @@ export default defineConfig({
7878

7979
Deploy your application to Cloudflare Workers using their one-click deployment process, and you're ready to go!
8080

81+
A full TanStack Start example for Cloudflare Workers is available [here](https://github.com/TanStack/router/tree/main/examples/react/start-basic-cloudflare).
82+
8183
### Netlify ⭐ _Official Partner_
8284

8385
<a href="https://www.netlify.com?utm_source=tanstack" alt="Netlify Logo">
@@ -114,7 +116,9 @@ Add a `netlify.toml` file to your project root:
114116

115117
Deploy your application using their one-click deployment process, and you're ready to go!
116118

117-
### Vercel
119+
### Nitro
120+
121+
[Nitro](https://nitro.build/) is an abstraction layer that allows you to deploy TanStack Start applications to [a wide range of providers](https://nitro.build/deploy).
118122

119123
**⚠️ During TanStack Start 1.0 release candidate phase, we currently recommend using:**
120124

@@ -123,22 +127,21 @@ Deploy your application using their one-click deployment process, and you're rea
123127

124128
#### Using Nitro v2
125129

126-
**⚠️ `@tanstack/nitro-v2-vite-plugin` is a temporary compatibility plugin for using Nitro v2 as the underlying build tool for TanStack Start. Use this plugin if you experience issues with the Nitro v3 plugin. It does not support all of Nitro v3's features and is limited in it's dev server capabilities, but should work as a safe fallback, even for production deployments for those who were using TanStack Start's alpha/beta versions.**
127-
128-
If you want to use this plugin with bun please make sure to use [isolated installs](https://bun.com/docs/install/isolated#using-isolated-installs).
130+
**⚠️ `@tanstack/nitro-v2-vite-plugin` is a temporary compatibility plugin for using Nitro v2 as the underlying build tool for TanStack Start. Use this plugin if you experience issues with the Nitro v3 plugin. It does not support all of Nitro v3's features and is limited in its dev server capabilities, but should work as a safe fallback, even for production deployments for those who were using TanStack Start's alpha/beta versions.**
129131

130132
```tsx
131133
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
132134
import { defineConfig } from 'vite'
133-
import tsConfigPaths from 'vite-tsconfig-paths'
134135
import viteReact from '@vitejs/plugin-react'
135136
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
136137

137138
export default defineConfig({
138139
plugins: [
139-
tsConfigPaths({ projects: ['./tsconfig.json'] }),
140140
tanstackStart(),
141-
nitroV2Plugin(),
141+
nitroV2Plugin(/*
142+
// nitro config goes here, e.g.
143+
{ target: 'node-server' }
144+
*/),
142145
viteReact(),
143146
],
144147
})
@@ -157,35 +160,29 @@ This package needs to be installed as follows:
157160
```tsx
158161
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
159162
import { defineConfig } from 'vite'
160-
import tsConfigPaths from 'vite-tsconfig-paths'
161163
import viteReact from '@vitejs/plugin-react'
162164
import { nitro } from 'nitro/vite'
163165

164166
export default defineConfig({
165167
plugins: [
166-
tsConfigPaths({ projects: ['./tsconfig.json'] }),
167168
tanstackStart(),
168-
nitro(),
169+
nitro(/*
170+
// nitro config goes here, e.g.
171+
{ config: { target: 'node-server' } }
172+
*/)
169173
viteReact(),
170174
],
171175
})
172176
```
173177

178+
### Vercel
179+
180+
Follow the [`Nitro`](#nitro) deployment instructions.
174181
Deploy your application to Vercel using their one-click deployment process, and you're ready to go!
175182

176183
### Node.js / Railway / Docker
177184

178-
TanStack Start builds to a `node` server by default. Use the `node` command to start your application from the server from the build output files.
179-
180-
```ts
181-
// vite.config.ts
182-
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
183-
import { defineConfig } from 'vite'
184-
185-
export default defineConfig({
186-
plugins: [tanstackStart()],
187-
})
188-
```
185+
Follow the [`Nitro`](#nitro) deployment instructions. Use the `node` command to start your application from the server from the build output files.
189186

190187
Ensure `build` and `start` npm scripts are present in your `package.json` file:
191188

@@ -217,22 +214,30 @@ Make sure that your `react` and `react-dom` packages are set to version 19.0.0 o
217214
bun install react@19 react-dom@19
218215
```
219216

220-
Ensure your `vite.config.ts` file is correct:
217+
Follow the [`Nitro`](#nitro) deployment instructions.
218+
Depending on how you invoke the build, you might need to set the `'bun'` preset in the Nitro configuration:
221219

222220
```ts
223221
// vite.config.ts
224-
import { defineConfig } from 'vite'
225222
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
223+
import { defineConfig } from 'vite'
226224
import viteReact from '@vitejs/plugin-react'
225+
import { nitroV2Plugin } from '@tanstack/nitro-v2-vite-plugin'
226+
// alternatively: import { nitro } from 'nitro/vite'
227227

228228
export default defineConfig({
229-
plugins: [tanstackStart(), viteReact()],
229+
plugins: [
230+
tanstackStart(),
231+
nitroV2Plugin({ preset: 'bun' })
232+
// alternatively: nitro( { config: { preset: 'bun' }} ),
233+
viteReact(),
234+
],
230235
})
231236
```
232237

233238
#### Production Server with Bun
234239

235-
To run TanStack Start applications in production with Bun, you need a custom server implementation.
240+
Alternatively, you can use a custom server implementation.
236241

237242
We've created an optimized production server that provides intelligent static asset loading with configurable memory management.
238243

@@ -307,4 +312,4 @@ STATIC_PRELOAD_VERBOSE=true bun run server.ts
307312
🚀 Server running at http://localhost:3000
308313
```
309314

310-
For a complete working example, check out the [TanStack Start + Bun example](../../../../examples/react/start-bun) in this repository.
315+
For a complete working example, check out the [TanStack Start + Bun example](https://github.com/TanStack/router/tree/main/examples/react/start-bun) in this repository.

examples/react/authenticated-routes-firebase/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"start": "vite"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-router": "^1.132.19",
13-
"@tanstack/react-router-devtools": "^1.132.19",
14-
"@tanstack/router-plugin": "^1.132.19",
12+
"@tanstack/react-router": "^1.132.21",
13+
"@tanstack/react-router-devtools": "^1.132.21",
14+
"@tanstack/router-plugin": "^1.132.21",
1515
"autoprefixer": "^10.4.20",
1616
"firebase": "^11.4.0",
1717
"postcss": "^8.5.1",

examples/react/authenticated-routes/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"start": "vite"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-router": "^1.132.19",
13-
"@tanstack/react-router-devtools": "^1.132.19",
14-
"@tanstack/router-plugin": "^1.132.19",
12+
"@tanstack/react-router": "^1.132.21",
13+
"@tanstack/react-router-devtools": "^1.132.21",
14+
"@tanstack/router-plugin": "^1.132.21",
1515
"react": "^19.0.0",
1616
"react-dom": "^19.0.0",
1717
"redaxios": "^0.5.1",

examples/react/basic-default-search-params/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
},
1111
"dependencies": {
1212
"@tanstack/react-query": "^5.66.0",
13-
"@tanstack/react-router": "^1.132.19",
14-
"@tanstack/react-router-devtools": "^1.132.19",
13+
"@tanstack/react-router": "^1.132.21",
14+
"@tanstack/react-router-devtools": "^1.132.21",
1515
"react": "^19.0.0",
1616
"react-dom": "^19.0.0",
1717
"redaxios": "^0.5.1",

examples/react/basic-devtools-panel/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"start": "vite"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-router": "^1.132.19",
13-
"@tanstack/react-router-devtools": "^1.132.19",
12+
"@tanstack/react-router": "^1.132.21",
13+
"@tanstack/react-router-devtools": "^1.132.21",
1414
"@tanstack/react-query-devtools": "^5.67.2",
1515
"react": "^19.0.0",
1616
"react-dom": "^19.0.0",

examples/react/basic-file-based/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"start": "vite"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-router": "^1.132.19",
13-
"@tanstack/react-router-devtools": "^1.132.19",
14-
"@tanstack/router-plugin": "^1.132.19",
12+
"@tanstack/react-router": "^1.132.21",
13+
"@tanstack/react-router-devtools": "^1.132.21",
14+
"@tanstack/router-plugin": "^1.132.21",
1515
"react": "^19.0.0",
1616
"react-dom": "^19.0.0",
1717
"redaxios": "^0.5.1",

examples/react/basic-non-nested-devtools/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"start": "vite"
1010
},
1111
"dependencies": {
12-
"@tanstack/react-router": "^1.132.19",
13-
"@tanstack/react-router-devtools": "^1.132.19",
12+
"@tanstack/react-router": "^1.132.21",
13+
"@tanstack/react-router-devtools": "^1.132.21",
1414
"react": "^19.0.0",
1515
"react-dom": "^19.0.0",
1616
"redaxios": "^0.5.1",

examples/react/basic-react-query-file-based/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
"dependencies": {
1212
"@tanstack/react-query": "^5.66.0",
1313
"@tanstack/react-query-devtools": "^5.66.0",
14-
"@tanstack/react-router": "^1.132.19",
15-
"@tanstack/react-router-devtools": "^1.132.19",
16-
"@tanstack/router-plugin": "^1.132.19",
14+
"@tanstack/react-router": "^1.132.21",
15+
"@tanstack/react-router-devtools": "^1.132.21",
16+
"@tanstack/router-plugin": "^1.132.21",
1717
"react": "^19.0.0",
1818
"react-dom": "^19.0.0",
1919
"redaxios": "^0.5.1",

examples/react/basic-react-query/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"dependencies": {
1212
"@tanstack/react-query": "^5.66.0",
1313
"@tanstack/react-query-devtools": "^5.66.0",
14-
"@tanstack/react-router": "^1.132.19",
15-
"@tanstack/react-router-devtools": "^1.132.19",
14+
"@tanstack/react-router": "^1.132.21",
15+
"@tanstack/react-router-devtools": "^1.132.21",
1616
"react": "^19.0.0",
1717
"react-dom": "^19.0.0",
1818
"redaxios": "^0.5.1",

0 commit comments

Comments
 (0)