feature/vue3-make-workbox-debug-configurable (#862)

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/862
Co-authored-by: dpschen <dpschen@noreply.kolaente.de>
Co-committed-by: dpschen <dpschen@noreply.kolaente.de>
This commit is contained in:
dpschen 2021-10-17 15:33:56 +00:00
parent 49cd66581d
commit dd0e04b106

View file

@ -3,7 +3,10 @@
const workboxVersion = 'v6.3.0' const workboxVersion = 'v6.3.0'
importScripts( `/workbox-${workboxVersion}/workbox-sw.js`) importScripts( `/workbox-${workboxVersion}/workbox-sw.js`)
workbox.setConfig({modulePathPrefix: `/workbox-${workboxVersion}`}) workbox.setConfig({
modulePathPrefix: `/workbox-${workboxVersion}`,
debug: Boolean(import.meta.env.VITE_WORKBOX_DEBUG),
})
import { precacheAndRoute } from 'workbox-precaching' import { precacheAndRoute } from 'workbox-precaching'
precacheAndRoute(self.__WB_MANIFEST) precacheAndRoute(self.__WB_MANIFEST)