You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for your interest in contributing to **SolidStart**! We welcome contributions including bug fixes, feature enhancements, documentation improvements, and more.
4
+
5
+
## Prerequisites
6
+
7
+
-**Node.js**: Use the version specified in `.nvmrc`, to manage multiple versions across your system, we recommend a version manager such as [fnm](https://github.com/Schniz/fnm), or another of your preference.
8
+
-**pnpm**: Install globally via `npm install -g pnpm`. Or let **Corepack** handle it in the setup step below.
9
+
-**Git**: Ensure Git is installed for cloning and managing the repository
2. Enable the correct pnpm version specified in package.json
21
+
22
+
```bash
23
+
corepack enable
24
+
```
25
+
26
+
3. Install dependencies
27
+
28
+
```bash
29
+
pnpm install
30
+
```
31
+
32
+
4. Build all packages and the landing page
33
+
```bash
34
+
pnpm run build:all
35
+
```
36
+
37
+
If you encounter issues (e.g. missing `node_modules`), clean the workspace
38
+
39
+
```bash
40
+
pnpm run clean:all
41
+
```
42
+
43
+
Then reinstall dependencies and rebuild.
44
+
45
+
## Monorepo Structure
46
+
47
+
SolidStart is a pnpm-based monorepo with nested workspaces. Key directories include
48
+
49
+
-**`packages/start`**: The core `@solidjs/start` package.
50
+
-**`packages/landing-page`**: The official landing page.
51
+
-**`examples/`**: Example projects for testing (a nested workspace; see details below).
52
+
-**`packages/tests`**: Unit and end-to-end (E2E) tests using Vitest and Cypress.
53
+
54
+
Use pnpm filters (e.g. `pnpm --filter @solidjs/start ...`) to target specific packages.
55
+
The `examples/` directory is a separate workspace with its own `pnpm-workspace.yaml` and `pnpm-lock.yaml`.
56
+
57
+
## Developing and Testing Changes
58
+
59
+
1. Make your changes in the relevant package (e.g. `packages/start`)
60
+
61
+
2. Rebuild affected packages
62
+
63
+
```bash
64
+
pnpm run packages:build
65
+
```
66
+
67
+
For a full rebuild: `pnpm run build:all`
68
+
69
+
3. Test your changes
70
+
71
+
- For examples
72
+
```bash
73
+
cd examples
74
+
pnpm install
75
+
pnpm --filter example-hackernews run dev # Runs the HackerNews example
76
+
```
77
+
- For the landing page (from the root directory)
78
+
```bash
79
+
pnpm run lp:dev
80
+
```
81
+
82
+
4. Clean builds if needed
83
+
```bash
84
+
pnpm run packages:clean # Cleans packages' node_modules and dist folders
85
+
pnpm run lp:clean # Cleans the landing page
86
+
pnpm run clean:root # Cleans root-level caches
87
+
```
88
+
89
+
## Running Tests
90
+
91
+
Tests are located in`packages/tests`, using Vitest for unit tests and Cypress for E2E tests.
92
+
93
+
1. Install the Cypress binary (required only once)
94
+
95
+
```bash
96
+
pnpm --filter tests exec cypress install
97
+
```
98
+
99
+
2. For unit tests that check build artifacts, build the test app first
100
+
101
+
```bash
102
+
pnpm --filter tests run build
103
+
```
104
+
105
+
3. Run unit tests
106
+
107
+
```bash
108
+
pnpm --filter tests run unit
109
+
```
110
+
111
+
- CI mode (run once): `pnpm --filter tests run unit:ci`
112
+
- UI mode: `pnpm --filter tests run unit:ui`
113
+
114
+
4. Run E2E tests
115
+
116
+
```bash
117
+
pnpm --filter tests run e2e:run
118
+
```
119
+
120
+
- Interactive mode: `pnpm --filter tests run e2e:open`
121
+
- With dev server: `pnpm --filter tests run e2e`
122
+
123
+
5. Clean test artifacts
124
+
```bash
125
+
pnpm run clean:test
126
+
```
127
+
128
+
## Using SolidStart in Your Own Monorepo
129
+
130
+
When integrating `@solidjs/start` into your own monorepo (e.g. using Yarn workspaces), configure dependency hoisting to ensure proper resolution. This helps runtime components (e.g. `client/index.tsx`) resolve correctly in generated files like `index.html`.
131
+
132
+
### Yarn v2+
133
+
134
+
In the project root's `package.json`
135
+
136
+
```jsonc
137
+
{
138
+
"installConfig": {
139
+
"hoistingLimits": "dependencies"
140
+
}
141
+
}
142
+
```
143
+
144
+
For pnpm monorepos, define workspaces in `pnpm-workspace.yaml`. If you encounter resolution issues (e.g. missing modules like `h3` from Vinxi), add `shamefully-hoist=true` to your `.npmrc` file. Test for duplicates and adjust configurations as necessary.
**SolidStart** brings fine-grained reactivity fullstack with full flexibility. Built with features like unified rendering and isomorphic code execution, SolidStart enables you to create highly performant and scalable web applications.
10
14
@@ -15,7 +19,7 @@ Explore the official [documentation](https://docs.solidjs.com/solid-start) for d
15
19
-**All Rendering Modes**:
16
20
- Server-Side Rendering _(SSR)_ with sync, async, and stream [modes](https://docs.solidjs.com/solid-start/reference/server/create-handler)
17
21
- Client-Side Rendering _(CSR)_
18
-
- Static Site Generation _(SSG)_
22
+
- Static Site Generation _(SSG)_ with route [pre-rendering](https://docs.solidjs.com/solid-start/building-your-application/route-prerendering)
19
23
-**TypeScript**: Full integration for robust, type-safe development
20
24
-**File-Based Routing**: Intuitive routing based on your project’s file structure
21
25
-**API Routes**: Dedicated server-side endpoints for seamless API development
@@ -27,35 +31,21 @@ Explore the official [documentation](https://docs.solidjs.com/solid-start) for d
27
31
28
32
### Installation
29
33
30
-
Create a template project with your preferred package manager
34
+
Create a SolidStart template project with your preferred package manager
31
35
32
36
```bash
33
37
# using npm
34
-
npm create solid@latest -- --solidstart
38
+
npm create solid@latest -- -s
35
39
```
36
40
37
41
```bash
38
42
# using pnpm
39
-
pnpm create solid@latest --solidstart
43
+
pnpm create solid@latest -s
40
44
```
41
45
42
46
```bash
43
47
# using bun
44
-
bun create solid@latest --solidstart
45
-
```
46
-
47
-
1. Follow the CLI prompts to set up your project
48
-
2. Navigate to your project directory and install the dependencies
49
-
50
-
```bash
51
-
cd<project-name>
52
-
npm install # or pnpm install or bun install
53
-
```
54
-
55
-
3. Start the development server
56
-
57
-
```bash
58
-
npm run dev # or pnpm dev or bun dev
48
+
bun create solid@latest --s
59
49
```
60
50
61
51
### Project Structure
@@ -68,7 +58,7 @@ npm run dev # or pnpm dev or bun dev
Use a Node.js version manager compatible with `.node-version`. We recommend [asdf-vm](https://asdf-vm.com/) for macOS and Linux users.
111
-
112
-
### Monorepo & Package Manager
113
-
114
-
SolidStart uses `pnpm` as the package manager. Install it globally:
115
-
116
-
```bash
117
-
npm install -g pnpm
118
-
```
119
-
120
-
Install dependencies for the monorepo:
121
-
122
-
```bash
123
-
pnpm install
124
-
```
125
-
126
-
Build the project:
127
-
128
-
```bash
129
-
pnpm build
130
-
```
131
-
132
-
### Monorepo & `package.json` Workspaces
133
-
134
-
If using a monorepo with `package.json``"workspaces"` (e.g., [Yarn Workspaces](https://classic.yarnpkg.com/en/docs/workspaces/)), ensure `@solidjs/start` is not hoisted. Add it to the `"nohoist"` field in the workspace root or project root:
135
-
136
-
**Workspace Root Example**:
137
-
138
-
```jsonc
139
-
{
140
-
"workspaces": {
141
-
"packages": [
142
-
/* ... */
143
-
],
144
-
"nohoist": ["**/@solidjs/start"]
145
-
}
146
-
}
147
-
```
148
-
149
-
**Project Root Example**:
150
-
151
-
```jsonc
152
-
{
153
-
"workspaces": {
154
-
"nohoist": ["@solidjs/start"]
155
-
}
156
-
}
157
-
```
158
-
159
-
For **Yarn v2+**, use `installConfig` to prevent hoisting:
160
-
161
-
```jsonc
162
-
{
163
-
"installConfig": {
164
-
"hoistingLimits":"dependencies"
165
-
}
166
-
}
167
-
```
168
-
169
-
**Note**: Add `@solidjs/start` as a `devDependency` in the child `package.json` to ensure the `/node_modules/@solidjs/start/runtime/entry.jsx` script is available.
0 commit comments