importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.2/workbox-sw.js'); //Workbox Config workbox.setConfig({ debug: false //set to true if you want to see SW in action. }); workbox.core.setCacheNameDetails({ prefix: 'regatten-', suffix: 'v1', precache: 'regatten--precache', runtime: 'regatten--runtime' }); workbox.precaching.precacheAndRoute([ ], { ignoreURLParametersMatching: [/.*/] }); workbox.routing.registerRoute( ({request}) => { if (request.destination === 'style') return true; if (request.destination === 'script') return true; if (request.destination === 'image') return true; if (request.destination === 'font') return true; return false; }, new workbox.strategies.StaleWhileRevalidate({ }) ); //Learn more about Service Workers and Configurations //https://developers.google.com/web/tools/workbox/