Skip to content

Commit a1170be

Browse files
committed
prep for bundling and publishing
1 parent 7c8b6f3 commit a1170be

File tree

3 files changed

+53
-5
lines changed

3 files changed

+53
-5
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Vite-Plugin-Nitro-2
2+
3+
This package moves Nitro into a Vite-Plugin to consolidate the API surface between Nitro v2 and v3.
4+
5+
## Usage
6+
7+
This plugin will provide SolidStart with the needed Node.js runtime to run in the backend.
8+
9+
```ts
10+
import { defineConfig } from "vite";
11+
import { nitroV2Plugin } from "@solidjs/vite-plugin-nitro-2";
12+
import { solidStart } from "@solidjs/start/config";
13+
14+
export default defineConfig({
15+
plugins: [solidStart(), nitroV2Plugin()]
16+
});
17+
```
18+
19+
Some features that previously were re-exported by SolidStart are available directly through this plugin now.
20+
21+
### Example: Prerendering
22+
23+
```ts
24+
import { defineConfig } from "vite";
25+
import { nitroV2Plugin } from "@solidjs/vite-plugin-nitro-2";
26+
import { solidStart } from "@solidjs/start/config";
27+
28+
export default defineConfig({
29+
plugins: [
30+
solidStart(),
31+
nitroV2Plugin({
32+
prerender: {
33+
crawlinks: true
34+
}
35+
})
36+
]
37+
});
38+
```
Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
11
{
2-
"name": "@solidjs/start-nitro-v2-vite-plugin",
2+
"name": "@solidjs/vite-plugin-nitro-2",
3+
"description": "Nitro v2 plugin for development with SolidStart 2.0",
34
"version": "0.0.1",
45
"type": "module",
56
"scripts": {
6-
"build": "tsc"
7+
"build": "tsc",
8+
"typecheck": "tsc --noEmit"
79
},
810
"exports": {
9-
".": "./src/index.ts"
11+
".": "./src/index.ts",
12+
"types": "./dist/index.d.ts"
1013
},
1114
"publishConfig": {
1215
"access": "public",
1316
"exports": {
14-
".": "./dist/index.js"
17+
".": "./dist/index.js",
18+
"types": "./dist/index.d.ts"
1519
}
1620
},
1721
"dependencies": {
18-
"nitropack": "^2.11.10",
22+
"nitropack": "^2.11.10"
23+
},
24+
"devDependencies": {
1925
"vite": "^7.1.10"
26+
},
27+
"peerDependencies": {
28+
"vite": "^7"
2029
}
2130
}

pnpm-lock.yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)