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