import { InjectManifestOptions as InjectManifestOptions$1, InjectManifestOptionsComplete as InjectManifestOptionsComplete$1 } from "@serwist/webpack-plugin"; import { RequiredSwDestPartial, RequiredSwDestResolved } from "@serwist/build"; import { Require } from "@serwist/utils"; import { NextConfig } from "next"; interface InjectPartial { /** * Enables additional route caching when users navigate through pages with * `next/link`. This improves the user experience in some cases but it * also adds a bit of overhead due to additional network calls. * @default false */ cacheOnNavigation?: boolean; /** * Whether Serwist should be disabled. * @default false */ disable?: boolean; /** * Whether `@serwist/next` should automatically register the service worker for you. If * you want to register the service worker yourself, set this to `false` and run * `window.serwist.register()` in `componentDidMount` or `useEffect`. * @example * ```tsx * // app/register-pwa.tsx * "use client"; * import { useEffect } from "react"; * import type { Serwist } from "@serwist/window"; * * declare global { * interface Window { * serwist: Serwist; * } * } * * export default function RegisterPWA() { * useEffect(() => { * if ("serviceWorker" in navigator && window.serwist !== undefined) { * window.serwist.register(); * } * }, []); * return <>>; * } * * // app/layout.tsx * import RegisterPWA from "./register-pwa"; * * export default function RootLayout({ * children, * }: { * children: React.ReactNode; * }) { * return ( * *
*