upgrade: 1st pass upgrade to Next.js v16

This commit is contained in:
2026-09-28 20:59:11 +02:00
parent abb766c2ae
commit d57fa83aca
26 changed files with 1101 additions and 2313 deletions
+21
View File
@@ -0,0 +1,21 @@
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();