// For the simplicity let's use Workbox hosted on CDN importScripts('https://storage.googleapis.com/workbox-cdn/releases/4.0.0/workbox-sw.js') // Detailed logging is very useful during development workbox.setConfig({debug: true}) // Updating SW lifecycle to update the app after user triggered refresh workbox.core.skipWaiting() workbox.core.clientsClaim() // We inject manifest here using "workbox-build" in workbox-build-inject.js workbox.precaching.precacheAndRoute([])