import type { NextConfig } from "next"; import withSerwistInit from "@serwist/next"; const withSerwist = withSerwistInit({ swSrc: "app/sw.ts", swDest: "public/sw.js", disable: process.env.NODE_ENV === "development", }); const config: NextConfig = { reactStrictMode: true, // Native/server-only deps — keep them out of the bundle. serverExternalPackages: ["better-sqlite3", "puppeteer"], // typedRoutes off: nav is config-driven (lib/nav.ts) with string hrefs, so // route-literal typing fights the dynamic pattern. }; export default withSerwist(config);