Skip to content

Commit a3c4854

Browse files
authored
test(react-start): flame perf setup uses pure nitro, no express layer (#6463)
1 parent bdae047 commit a3c4854

4 files changed

Lines changed: 83 additions & 146 deletions

File tree

e2e/react-start/flamegraph-bench/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@
44
"type": "module",
55
"scripts": {
66
"build": "NODE_ENV=production vite build --mode=production",
7-
"start": "NODE_ENV=production node ./tests/server.js",
8-
"start:prof": "NODE_ENV=production flame run --md-format=detailed ./tests/server.js",
7+
"start": "NODE_ENV=production node ./.output/server/index.mjs",
8+
"start:prof": "NODE_ENV=production flame run --md-format=detailed ./.output/server/index.mjs",
99
"bench": "pnpm build && pnpm bench:run",
1010
"bench:run": "concurrently -k -s first \"pnpm start:prof\" \"sleep 3 && node ./tests/bench.js\""
1111
},
1212
"dependencies": {
1313
"@tanstack/react-router": "workspace:*",
1414
"@tanstack/react-start": "workspace:*",
15-
"express": "^4.21.2",
1615
"react": "^19.0.0",
1716
"react-dom": "^19.0.0",
1817
"srvx": "^0.10.0"
1918
},
2019
"devDependencies": {
2120
"@platformatic/flame": "latest",
2221
"@vitejs/plugin-react": "^4.3.4",
22+
"nitro": "npm:nitro-nightly@latest",
2323
"autocannon": "^8.0.0",
2424
"concurrently": "9.2.1",
2525
"typescript": "^5.7.2",

e2e/react-start/flamegraph-bench/tests/server.js

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { defineConfig } from 'vite'
22
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
33
import viteReact from '@vitejs/plugin-react'
4+
import { nitro } from 'nitro/vite'
45

56
export default defineConfig({
67
server: {
78
port: 3000,
89
},
9-
plugins: [tanstackStart(), viteReact()],
10+
plugins: [tanstackStart(), viteReact(), nitro()],
1011
})

pnpm-lock.yaml

Lines changed: 78 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)