import type { NextConfig } from "next"; const nextConfig: NextConfig = { // Standalone output: the frontend image runs `node server.js` from // distroless with no node_modules — required for the air-gapped bundle. output: "standalone", // The service worker must never be cached: a stale sw.js (e.g. Cloudflare's // default 4h Browser Cache TTL) delays update detection, so a new deploy's // auto-reload never fires and users stay on the old build. Force revalidation // so the browser always re-checks sw.js and picks up new versions at once. async headers() { return [ { source: "/sw.js", headers: [{ key: "Cache-Control", value: "no-cache, no-store, must-revalidate" }], }, ]; }, }; export default nextConfig;