proxitok/sw.js
Pablo Ferreiro de85ba3e44
hotfix
2022-11-04 17:36:18 +01:00

18 lines
470 B
JavaScript

const PWA_PRELOAD = {
pages: ['/', '/about', '/settings'],
scripts: ['/scripts/navbar.js', '/scripts/themes/card.js'],
styles: ['/styles/vendor/bulma.min.css', '/styles/vendor/cssgg.min.css', '/styles/themes/card.css']
}
self.addEventListener("install", function(e) {
e.waitUntil(
caches.open("pwa").then(function(cache) {
return cache.addAll([
...PWA_PRELOAD.pages,
...PWA_PRELOAD.scripts,
...PWA_PRELOAD.styles
]);
})
);
});