feat: make workbox debug logging configurable
Some checks failed
continuous-integration/drone/pr Build is failing

This commit is contained in:
Dominik Pschenitschni 2021-10-17 15:27:19 +02:00
parent c1078255fc
commit 20ba8b199a
Signed by: dpschen
GPG Key ID: B257AC0149F43A77

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)