Found during: Build testing (2026-04-01)
Severity: high
Problem
pnpm astro build OOMs with default Node.js heap (~4GB) when building all 53 titles of statutory content. The build collects 28s of content data then crashes during static entrypoint generation.
Workaround
NODE_OPTIONS='--max-old-space-size=8192' pnpm astro build
Root Cause
Building all chapter pages renders every section inline at build time. The hybrid chapter page refactor (index-by-default for >50 sections) should reduce memory pressure significantly.
Fix Plan
- Update
apps/web/package.json build script to include NODE_OPTIONS='--max-old-space-size=8192'
- Update CI workflow to set the same env var
- Long-term: the hybrid chapter page refactor defers rendering large chapters, reducing build memory
- Consider Astro's
server output mode for very large chapters
Found during: Build testing (2026-04-01)
Severity: high
Problem
pnpm astro buildOOMs with default Node.js heap (~4GB) when building all 53 titles of statutory content. The build collects 28s of content data then crashes during static entrypoint generation.Workaround
NODE_OPTIONS='--max-old-space-size=8192' pnpm astro buildRoot Cause
Building all chapter pages renders every section inline at build time. The hybrid chapter page refactor (index-by-default for >50 sections) should reduce memory pressure significantly.
Fix Plan
apps/web/package.jsonbuild script to includeNODE_OPTIONS='--max-old-space-size=8192'serveroutput mode for very large chapters