mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
Add `src/lib/http/cache-headers.ts` exporting two presets and one applier. `NO_STORE_BUT_BFCACHE` (`private, max-age=0, must-revalidate`) replaces the framework's stock `no-store, must-revalidate` on authenticated page responses; Chromium treats the latter as a hard bfcache breaker, while the former keeps shared caches out, forces revalidation on every navigation, and stays bfcache-eligible. `SHORT_LIVED_PUBLIC` covers static-ish one-hour public payloads. `applyAuthedHeaders(res)` stamps the bfcache-friendly directive onto a Response in-place for route handlers that opt into the same posture. Also add `scripts/print-bundle-report.mjs` (wired earlier as the `bundle-report` npm script). Turbopack dropped the webpack "First Load JS" summary line from `next build`; the script reads back the `.next/analyze/client.json` payload that `@next/bundle-analyzer` writes when `pnpm analyze` runs and prints a sorted table of the largest client chunks (parsed, gzip, stat sizes plus totals). Output restores an at-a-glance signal for client-bundle regressions on release rounds without re-running Lighthouse.