mirror of
https://github.com/navidrome/navidrome.git
synced 2025-12-23 23:18:05 -05:00
fix(ui): service worker crashing on precacheAndRoute (#3528)
This commit is contained in:
@@ -13,4 +13,5 @@ mv build/3rdparty/workbox-*/workbox-core.prod.js ${WORKBOX_DIR}
|
||||
mv build/3rdparty/workbox-*/workbox-strategies.prod.js ${WORKBOX_DIR}
|
||||
mv build/3rdparty/workbox-*/workbox-routing.prod.js ${WORKBOX_DIR}
|
||||
mv build/3rdparty/workbox-*/workbox-navigation-preload.prod.js ${WORKBOX_DIR}
|
||||
mv build/3rdparty/workbox-*/workbox-precaching.prod.js ${WORKBOX_DIR}
|
||||
rm -rf build/3rdparty/workbox-*
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user