chore: try remove workbox preaching
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user