From 03e99f55c651e79b3decb66c65b1541534dbbb69 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 25 Nov 2025 14:48:54 +0800 Subject: [PATCH] chore: try remove workbox preaching --- apps/desktop/layer/renderer/src/workers/sw/index.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/apps/desktop/layer/renderer/src/workers/sw/index.ts b/apps/desktop/layer/renderer/src/workers/sw/index.ts index 5fe34af11..e91e4b328 100644 --- a/apps/desktop/layer/renderer/src/workers/sw/index.ts +++ b/apps/desktop/layer/renderer/src/workers/sw/index.ts @@ -1,7 +1,6 @@ /// import { CacheableResponsePlugin } from "workbox-cacheable-response" import { ExpirationPlugin } from "workbox-expiration" -import { precacheAndRoute } from "workbox-precaching" import { registerRoute } from "workbox-routing" import { CacheFirst } from "workbox-strategies" @@ -11,12 +10,6 @@ declare let self: ServiceWorkerGlobalScope registerPusher(self) -const preCacheExclude = new Set(["og-image.png", "opengraph-image.png"]) - -const precacheManifest = self.__WB_MANIFEST.filter((entry) => { - return typeof entry === "string" || !preCacheExclude.has(entry.url) -}) - registerRoute( ({ request }) => request.destination === "image", new CacheFirst({ @@ -33,5 +26,3 @@ registerRoute( ], }), ) - -precacheAndRoute(precacheManifest)