/// /// import { Serwist } from "serwist"; import type { PrecacheEntry, SerwistGlobalConfig } from "serwist"; import { defaultCache } from "@serwist/next/worker"; declare global { interface WorkerGlobalScope extends SerwistGlobalConfig { __SW_MANIFEST: (PrecacheEntry | string)[] | undefined; } } declare const self: ServiceWorkerGlobalScope; const serwist = new Serwist({ precacheEntries: self.__SW_MANIFEST, skipWaiting: true, clientsClaim: true, navigationPreload: true, runtimeCaching: defaultCache, }); serwist.addEventListeners();