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

Co-authored-by: Dominik Pschenitschni <mail@celement.de>
Reviewed-on: vikunja/frontend#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
1 changed files with 4 additions and 1 deletions

View File

@ -3,7 +3,10 @@
const workboxVersion = 'v6.3.0'
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'
precacheAndRoute(self.__WB_MANIFEST)