chore: try remove workbox preaching

This commit is contained in:
Stephen Zhou
2025-11-25 14:48:54 +08:00
parent 51d39f6f6f
commit 03e99f55c6
@@ -1,7 +1,6 @@
/// <reference lib="webworker" />
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)