1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
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);
|