Skip to content

Commit 132bd0c

Browse files
docs(start): build-from-scratch guide to use customVite(React/Solid)Plugin (#4678)
Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
1 parent 4704c97 commit 132bd0c

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

docs/start/framework/react/build-from-scratch.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,25 @@ We'll then update our `package.json` to use Vite's CLI and set `"type": "module"
8484

8585
Then configure TanStack Start's Vite plugin in `vite.config.ts`:
8686

87+
> [!NOTE]
88+
> TanStack Start will stop auto-configuring React/Solid Vite plugins. You’ll get full control - choose `@vitejs/plugin-react`, `@vitejs/plugin-react-oxc`, etc. Set `customViteReactPlugin: true` to opt in to this feature right now!
89+
8790
```ts
8891
// vite.config.ts
8992
import { defineConfig } from 'vite'
9093
import tsConfigPaths from 'vite-tsconfig-paths'
9194
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
95+
import viteReact from '@vitejs/plugin-react'
9296

9397
export default defineConfig({
9498
server: {
9599
port: 3000,
96100
},
97-
plugins: [tsConfigPaths(), tanstackStart()],
101+
plugins: [
102+
tsConfigPaths(),
103+
tanstackStart({ customViteReactPlugin: true }),
104+
viteReact(),
105+
],
98106
})
99107
```
100108

docs/start/framework/solid/build-from-scratch.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,25 @@ We'll then update our `package.json` to use Vite's CLI and set `"type": "module"
8585

8686
Then configure TanStack Start's Vite plugin in `vite.config.ts`:
8787

88+
> [!NOTE]
89+
> TanStack Start will stop auto-configuring React/Solid Vite plugins. You’ll get full control - choose `vite-plugin-solid`. Set `customViteSolidPlugin: true` to opt in to this feature right now!
90+
8891
```ts
8992
// vite.config.ts
9093
import { defineConfig } from 'vite'
9194
import tsConfigPaths from 'vite-tsconfig-paths'
9295
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
96+
import viteSolid from 'vite-plugin-solid'
9397

9498
export default defineConfig({
9599
server: {
96100
port: 3000,
97101
},
98-
plugins: [tsConfigPaths(), tanstackStart()],
102+
plugins: [
103+
tsConfigPaths(),
104+
tanstackStart({ customViteSolidPlugin: true }),
105+
viteSolid({ ssr: true }),
106+
],
99107
})
100108
```
101109

0 commit comments

Comments
 (0)