Use local copy of workbox service worker scripts (#1358)
* Use local copy of workbox service worker scripts * Refactor workbox integration: - Only add prod js, without maps. Reduces the size from 170k to 24k - Removed it from build. As it is small now, we can add it to source, and have a script to just update it whenever it is required - Fixed relative paths in navidrome-service-worker.js, should now work with BaseUrl != '' Co-authored-by: Deluan <deluan@navidrome.org>
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
// documentation: https://developers.google.com/web/tools/workbox/modules/workbox-sw
|
||||
importScripts("https://storage.googleapis.com/workbox-cdn/releases/6.1.2/workbox-sw.js");
|
||||
importScripts('3rdparty/workbox/workbox-sw.js')
|
||||
|
||||
workbox.setConfig({
|
||||
modulePathPrefix: '3rdparty/workbox/',
|
||||
debug: false,
|
||||
})
|
||||
|
||||
workbox.loadModule('workbox-core');
|
||||
workbox.loadModule('workbox-strategies');
|
||||
|
||||
Reference in New Issue
Block a user