Requirements, execution plan, functional design, code summaries, build and test results and the audit log; the reverse-engineering notes and the feature registry are updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
22 lines
1.7 KiB
Markdown
22 lines
1.7 KiB
Markdown
# Build Instructions
|
|
|
|
## Prerequisites
|
|
- **Build tool**: pnpm 12.11 (`packageManager` in `web/package.json`), Vite, TypeScript; Node as in the CI image.
|
|
- **Dependencies**: the lock file `web/pnpm-lock.yaml`; no dependency was added or changed in this feature. In a new worktree run `pnpm install --frozen-lockfile` first.
|
|
- **Environment variables**: none needed locally. `LIGHTHOUSE_PERFORMANCE=warn` is set by CI (see performance-test-instructions.md).
|
|
- **System requirements**: Chrome for Lighthouse and the browser checks (`C:\Program Files\Google\Chrome\Application\chrome.exe` on this PC); free port 4173 for `pnpm preview` and Lighthouse.
|
|
|
|
## Build steps
|
|
|
|
1. Install dependencies: `cd web && pnpm install --frozen-lockfile`.
|
|
2. Build everything: `pnpm build` (runs `tsc`, `vite build` with prerender, and the script that moves inline scripts into files).
|
|
3. Verify: the output lists the 12 prerendered pages (`/`, `/404`, `/over-mij`, `/portfolio`, `/contact`, `/privacyverklaring`, `/soorten-fotoshoots` and its five shoot pages) and ends with "Inline scripts verplaatst: 12 pagina's gecontroleerd, 16 scripts verplaatst, 28 bestanden geschreven".
|
|
|
|
**Build artifacts**: `web/dist/client` (static HTML per page, assets, moved scripts). **Common warnings**: none expected.
|
|
|
|
## Troubleshooting
|
|
|
|
- **Type errors in `tsc`**: run `pnpm exec tsc --noEmit` to see them without building; the Chakra types come from `pnpm typegen` (also run by `postinstall`).
|
|
- **`vite build` fails during prerender**: a page throws while rendering on the server; run the failing route's test (`pnpm exec vitest run src/<test>`) to find it.
|
|
- **Port 4173 in use**: another session may be running Lighthouse; ask before starting `pnpm preview` (see the parallel-sessions agreement).
|