From 625399bdd992171812a8adf4f169328045c3a4bc Mon Sep 17 00:00:00 2001 From: keven1024 Date: Sun, 5 Apr 2026 11:59:00 +0800 Subject: [PATCH] chore(front): remove service worker implementation to streamline front-end architecture --- front/service-worker.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 front/service-worker.ts diff --git a/front/service-worker.ts b/front/service-worker.ts deleted file mode 100644 index 3d3632f..0000000 --- a/front/service-worker.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { defaultCache } from "@serwist/vite/worker"; -import type { PrecacheEntry, SerwistGlobalConfig } from "serwist"; -import { Serwist } from "serwist"; - -// This declares the value of `injectionPoint` to TypeScript. -// `injectionPoint` is the string that will be replaced by the -// actual precache manifest. By default, this string is set to -// `"self.__SW_MANIFEST"`. -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(); \ No newline at end of file