Skip to content

Commit 07f56f8

Browse files
authored
docs(solid-start): nitro v3 vite plugin example (#5577)
1 parent 37ac3ad commit 07f56f8

Some content is hidden

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

49 files changed

+2604
-608
lines changed

docs/start/config.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,10 @@
333333
{
334334
"label": "Netlify Vite Plugin",
335335
"to": "framework/solid/examples/start-basic-netlify"
336+
},
337+
{
338+
"label": "Nitro Vite Plugin",
339+
"to": "framework/solid/examples/start-basic-nitro"
336340
}
337341
]
338342
}

examples/solid/start-basic-netlify/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
"tailwindcss": "^3.4.17",
2424
"typescript": "^5.7.2",
2525
"vite": "^7.1.7",
26-
"vite-tsconfig-paths": "^5.1.4",
27-
"wrangler": "^4.40.2"
26+
"vite-tsconfig-paths": "^5.1.4"
2827
}
2928
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
node_modules
2+
.DS_Store
3+
.cache
4+
.env
5+
dist
6+
.wrangler
7+
8+
# Local Netlify folder
9+
.netlify
10+
.nitro
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
**/public
2+
pnpm-lock.yaml
3+
routeTree.gen.ts
4+
worker-configuration.d.ts
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"files.watcherExclude": {
3+
"**/routeTree.gen.ts": true
4+
},
5+
"search.exclude": {
6+
"**/routeTree.gen.ts": true
7+
},
8+
"files.readonlyInclude": {
9+
"**/routeTree.gen.ts": true
10+
}
11+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Start Basic Netlify
2+
3+
## Getting Started
4+
5+
### Install the dependencies
6+
7+
```bash
8+
pnpm i
9+
```
10+
11+
### Start the development server
12+
13+
```bash
14+
pnpm dev
15+
```
16+
17+
### Build for Production
18+
19+
```bash
20+
pnpm build
21+
```
22+
23+
### Deploy to Netlify
24+
25+
```sh
26+
netlify deploy
27+
```
28+
29+
## Accessing bindings
30+
31+
You can access Cloudflare bindings in server functions by using importable `env`:
32+
33+
```ts
34+
import { env } from 'cloudflare:workers'
35+
```
36+
37+
See `src/routes/index.tsx` for an example.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "tanstack-solid-start-example-basic-nitro",
3+
"private": true,
4+
"sideEffects": false,
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite dev",
8+
"build": "vite build && tsc --noEmit",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"@tanstack/solid-router": "^1.133.20",
13+
"@tanstack/solid-router-devtools": "^1.133.20",
14+
"@tanstack/solid-start": "^1.133.20",
15+
"solid-js": "^1.9.5"
16+
},
17+
"devDependencies": {
18+
"nitro": "^3.0.1-alpha.0",
19+
"@types/node": "^22.5.4",
20+
"vite-plugin-solid": "^2.11.10",
21+
"autoprefixer": "^10.4.20",
22+
"postcss": "^8.5.1",
23+
"tailwindcss": "^3.4.17",
24+
"typescript": "^5.7.2",
25+
"vite": "^7.1.7",
26+
"vite-tsconfig-paths": "^5.1.4"
27+
}
28+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
export default {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}
29.3 KB
Loading
107 KB
Loading

0 commit comments

Comments
 (0)