# Build Instructions — homepage-sections ## Prerequisites - **Node.js** 24 and **pnpm** (version pinned in `web/package.json`) - **OS**: Windows, Linux or macOS. CI builds on the Raspberry Pi runner (arm64). - **Environment variables**: none for the build. `LIGHTHOUSE_PERFORMANCE=warn` only in CI (see performance instructions) ## Build steps ```bash cd web pnpm install # also runs `chakra typegen` (postinstall) pnpm build # tsc && vite build ``` After changing theme tokens (`src/theme.ts`), run `pnpm typegen` so token names such as `header.sticky` type-check. ## Verify - **Expected output**: `✓ built in …s` and no TypeScript errors - **Artifacts**: `web/dist/` (`index.html`, `assets/*.js|css|jpg|png`) - **Accepted warning**: Vite's chunk-size warning for the main bundle (`index-*.js`, ~575 kB unminified size before gzip). This is known and tracked under responsive images and prerendering (NFR-P-01). ## Troubleshooting - **Unknown token type errors after a theme change** → `pnpm typegen`. - **Lighthouse or preview fails with "port in use"** → a preview server is still running on 4173. Stop it first.