`build:js` was shipping React's development build. That cost 222 KB of the 566 KB bundle (61 KB of 164 KB gzipped), ran every element creation through dev-only validation, and left `StrictMode` double-invoking effects — so `fetchFeed` fired twice and every reader downloaded the feed twice on every single load. On a 4G/4×-CPU profile with the cache cold: first contentful paint 1480ms → 972ms, the feed on screen 1766ms → 1261ms, and two feed requests → one. The flag is `--production` and not `--define process.env.NODE_ENV='"production"'`, which is the obvious-looking version and produces a bundle that does not run at all: the define flips React to its production build while the JSX transform keeps emitting `jsxDEV`, so the page dies on `z is not a function` with a blank body. Both variants build clean, typecheck clean and pass all 843 tests, because nothing in the suite executes the bundle — so AGENTS.md now says to open a browser before believing this one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
32 lines
1.0 KiB
JSON
32 lines
1.0 KiB
JSON
{
|
|
"name": "gacha-event-tracker",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"test": "bun test",
|
|
"typecheck": "tsc --noEmit",
|
|
"parse": "bun run scripts/parse-fixture.ts",
|
|
"build:feed": "bun run scripts/build-feed.ts",
|
|
"refresh": "bun run scripts/refresh-sources.ts",
|
|
"build:css": "bunx @tailwindcss/cli -i src/client/styles.css -o public/styles.css --minify",
|
|
"build:js": "bun build src/client/main.tsx --outfile public/main.js --minify --production",
|
|
"build": "bun run build:feed && bun run build:css && bun run build:js && bun run build:static",
|
|
"dev": "bun run build && bun run serve.ts",
|
|
"build:static": "bun run scripts/build-static.ts",
|
|
"serve": "bun run serve.ts"
|
|
},
|
|
"dependencies": {
|
|
"react": "^19.2.8",
|
|
"react-dom": "^19.2.8",
|
|
"zod": "^3.23.8"
|
|
},
|
|
"devDependencies": {
|
|
"@tailwindcss/cli": "^4.3.3",
|
|
"@types/bun": "^1.1.10",
|
|
"@types/react": "^19.2.18",
|
|
"@types/react-dom": "^19.2.4",
|
|
"tailwindcss": "^4.3.3",
|
|
"typescript": "^5.6.3"
|
|
}
|
|
}
|