Skip to content

Commit cff1b2c

Browse files
authored
docs: make Netlify hosting docs precise and actionable (#5747)
docs: improve Netlify hosting docs golden path Revamp the Netlify hosting docs again, to provide a single golden default path that is precise and works for most use cases, and call out alternatives separately in subsections. Also add links out to further Netlify docs where appropriate to increase discoverability and troubleshootability.
1 parent 5100cd3 commit cff1b2c

File tree

2 files changed

+80
-10
lines changed

2 files changed

+80
-10
lines changed

docs/start/framework/react/guide/hosting.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,21 +129,45 @@ A full TanStack Start example for Cloudflare Workers is available [here](https:/
129129

130130
### Netlify
131131

132-
Install and add the [`@netlify/vite-plugin-tanstack-start`](https://www.npmjs.com/package/@netlify/vite-plugin-tanstack-start) plugin, which configures your build for Netlify deployment and provides full Netlify production platform emulation in local dev.
132+
Install and add the [`@netlify/vite-plugin-tanstack-start`](https://www.npmjs.com/package/@netlify/vite-plugin-tanstack-start) plugin, which configures your build for Netlify deployment and provides full Netlify production platform emulation in local dev:
133+
134+
```bash
135+
npm install --save-dev @netlify/vite-plugin-tanstack-start
136+
# or...
137+
pnpm add --save-dev @netlify/vite-plugin-tanstack-start
138+
# or yarn, bun, etc.
139+
```
133140

134141
```ts
135142
// vite.config.ts
136143
import { defineConfig } from 'vite'
137144
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
138-
import netlify from '@netlify/vite-plugin-tanstack-start'
145+
import netlify from '@netlify/vite-plugin-tanstack-start' // ← add this
139146
import viteReact from '@vitejs/plugin-react'
140147

141148
export default defineConfig({
142-
plugins: [tanstackStart(), netlify(), viteReact()],
149+
plugins: [
150+
tanstackStart(),
151+
netlify(), // ← add this (anywhere in the array is fine)
152+
viteReact(),
153+
],
143154
})
144155
```
145156

146-
Add a `netlify.toml` file to your project root:
157+
Finally, use [Netlify CLI](https://developers.netlify.com/cli/) to deploy your app:
158+
159+
```bash
160+
npx netlify deploy
161+
```
162+
163+
If this is a new Netlify project, you'll be prompted to initialize it and build settings will be automatically configured for you.
164+
165+
For more detailed documentation, check out the full [TanStack Start on Netlify
166+
docs](https://docs.netlify.com/build/frameworks/framework-setup-guides/tanstack-start/).
167+
168+
#### Manual configuration
169+
170+
Alternatively, if you prefer manual configuration, you can add a `netlify.toml` file to your project root:
147171

148172
```toml
149173
[build]
@@ -154,7 +178,18 @@ Add a `netlify.toml` file to your project root:
154178
port = 3000
155179
```
156180

157-
Deploy your application using their one-click deployment process, and you're ready to go!
181+
Or you can set the above settings directly [in the Netlify
182+
app](https://docs.netlify.com/build/configure-builds/overview/#build-settings).
183+
184+
#### Other deployment methods
185+
186+
Netlify also supports other deployment methods, such as [continuous deployment from a git repo
187+
hosted on GitHub, GitLab, or
188+
others](https://docs.netlify.com/start/quickstarts/deploy-from-repository/), [starting from a
189+
template](https://docs.netlify.com/start/quickstarts/deploy-from-template/), [deploying or
190+
importing from an AI code generation
191+
tool](https://docs.netlify.com/start/quickstarts/deploy-from-ai-code-generation-tool/), and
192+
[more](https://docs.netlify.com/deploy/create-deploys/).
158193

159194
### Nitro
160195

docs/start/framework/solid/guide/hosting.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,21 +123,45 @@ Deploy your application to Cloudflare Workers using their one-click deployment p
123123

124124
### Netlify
125125

126-
Install and add the [`@netlify/vite-plugin-tanstack-start`](https://www.npmjs.com/package/@netlify/vite-plugin-tanstack-start) plugin, which configures your build for Netlify deployment and provides full Netlify production platform emulation in local dev.
126+
Install and add the [`@netlify/vite-plugin-tanstack-start`](https://www.npmjs.com/package/@netlify/vite-plugin-tanstack-start) plugin, which configures your build for Netlify deployment and provides full Netlify production platform emulation in local dev:
127+
128+
```bash
129+
npm install --save-dev @netlify/vite-plugin-tanstack-start
130+
# or...
131+
pnpm add --save-dev @netlify/vite-plugin-tanstack-start
132+
# or yarn, bun, etc.
133+
```
127134

128135
```ts
129136
// vite.config.ts
130137
import { defineConfig } from 'vite'
131138
import { tanstackStart } from '@tanstack/solid-start/plugin/vite'
132-
import netlify from '@netlify/vite-plugin-tanstack-start'
139+
import netlify from '@netlify/vite-plugin-tanstack-start' // ← add this
133140
import viteSolid from 'vite-plugin-solid'
134141

135142
export default defineConfig({
136-
plugins: [tanstackStart(), netlify(), viteSolid({ ssr: true })],
143+
plugins: [
144+
tanstackStart(),
145+
netlify(), // ← add this (anywhere in the array is fine)
146+
viteSolid({ ssr: true }),
147+
],
137148
})
138149
```
139150

140-
Add a `netlify.toml` file to your project root:
151+
Finally, use [Netlify CLI](https://developers.netlify.com/cli/) to deploy your app:
152+
153+
```bash
154+
npx netlify deploy
155+
```
156+
157+
If this is a new Netlify project, you'll be prompted to initialize it and build settings will be automatically configured for you.
158+
159+
For more detailed documentation, check out the full [TanStack Start on Netlify
160+
docs](https://docs.netlify.com/build/frameworks/framework-setup-guides/tanstack-start/).
161+
162+
#### Manual configuration
163+
164+
Alternatively, if you prefer manual configuration, you can add a `netlify.toml` file to your project root:
141165

142166
```toml
143167
[build]
@@ -148,7 +172,18 @@ Add a `netlify.toml` file to your project root:
148172
port = 3000
149173
```
150174

151-
Deploy your application using their one-click deployment process, and you're ready to go!
175+
Or you can set the above settings directly [in the Netlify
176+
app](https://docs.netlify.com/build/configure-builds/overview/#build-settings).
177+
178+
#### Other deployment methods
179+
180+
Netlify also supports other deployment methods, such as [continuous deployment from a git repo
181+
hosted on GitHub, GitLab, or
182+
others](https://docs.netlify.com/start/quickstarts/deploy-from-repository/), [starting from a
183+
template](https://docs.netlify.com/start/quickstarts/deploy-from-template/), [deploying or
184+
importing from an AI code generation
185+
tool](https://docs.netlify.com/start/quickstarts/deploy-from-ai-code-generation-tool/), and
186+
[more](https://docs.netlify.com/deploy/create-deploys/).
152187

153188
### Nitro
154189

0 commit comments

Comments
 (0)