Skip to content

Instantly share code, notes, and snippets.

View realtebo's full-sized avatar
💭
I may be slow to respond.

Mirko Tebaldi realtebo

💭
I may be slow to respond.
  • Somewhere over the raimbow
  • Ferrara, Italy
View GitHub Profile
@realtebo
realtebo / service-worker.js
Created November 15, 2018 08:04 — forked from cristoni/service-worker.js
Esempio di service worker con workbox per workbox-webpack-plugin
if (workbox) {
console.log(`Yay! Workbox is loaded 🎉`);
// workbox.setConfig({ debug: false });
// workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerRoute(/^https?.*/, workbox.strategies.networkFirst(), 'GET');
} else {
console.log(`Boo! Workbox didn't load 😬`);
}