fix(ui): service worker crashing on precacheAndRoute (#3528)

This commit is contained in:
Kendall Garner
2024-12-08 22:43:34 +00:00
committed by GitHub
parent 9cbdb20a31
commit 1a36f06147
2 changed files with 3 additions and 1 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ workbox.loadModule('workbox-core')
workbox.loadModule('workbox-strategies')
workbox.loadModule('workbox-routing')
workbox.loadModule('workbox-navigation-preload')
workbox.loadModule('workbox-precaching')
workbox.core.clientsClaim()
self.skipWaiting()
@@ -48,7 +49,7 @@ const navigationHandler = async (params) => {
}
// self.__WB_MANIFEST is default injection point
precacheAndRoute(self.__WB_MANIFEST)
workbox.precaching.precacheAndRoute(self.__WB_MANIFEST)
// Register this strategy to handle all navigations.
workbox.routing.registerRoute(