work on sw

This commit is contained in:
William Blythe
2018-11-07 13:08:35 +11:00
parent 8e5dd9fb8d
commit 0ea25692d3
2 changed files with 27 additions and 24 deletions

View File

@@ -2,6 +2,7 @@ console.log('Hello from sw.js');
if (workbox) {
console.log('Yay! Workbox is loaded 🎉');
workbox.precaching.precacheAndRoute(self.__precacheManifest);
workbox.routing.registerRoute(
new RegExp('https://fonts.(?:googleapis|gstatic).com/(.*)'),
workbox.strategies.cacheFirst({