Skip to content

Commit a27e9da

Browse files
committed
fix: keep build step
1 parent 129635c commit a27e9da

File tree

1 file changed

+6
-3
lines changed
  • docs/platforms/javascript/guides/tanstackstart-react

1 file changed

+6
-3
lines changed

docs/platforms/javascript/guides/tanstackstart-react/index.mdx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,14 @@ For example, when using [nitro](https://nitro.build/), copy the instrumentation
157157

158158
Add a `--import` flag directly or to the `NODE_OPTIONS` environment variable wherever you run your application to import `instrument.server.mjs`.
159159

160-
```json {filename:package.json}
160+
```json {diff} {filename:package.json}
161161
{
162162
"scripts": {
163-
"dev": "NODE_OPTIONS='--import ./instrument.server.mjs' vite dev --port 3000",
164-
"start": "node --import ./.output/server/instrument.server.mjs .output/server/index.mjs",
163+
"build": "vite build && cp instrument.server.mjs .output/server",
164+
- "dev": "vite dev --port 3000",
165+
+ "dev": "NODE_OPTIONS='--import ./instrument.server.mjs' vite dev --port 3000",
166+
- "start": "node .output/server/index.mjs",
167+
+ "start": "node --import ./.output/server/instrument.server.mjs .output/server/index.mjs",
165168
}
166169
}
167170
```

0 commit comments

Comments
 (0)