You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
115 lines
3.4 KiB
115 lines
3.4 KiB
/**
|
|
* Welcome to your Workbox-powered service worker!
|
|
*
|
|
* You'll need to register this file in your web app and you should
|
|
* disable HTTP caching for this file too.
|
|
* See https://goo.gl/nhQhGp
|
|
*
|
|
* The rest of the code is auto-generated. Please don't update this file
|
|
* directly; instead, make changes to your Workbox build configuration
|
|
* and re-run your build process.
|
|
* See https://goo.gl/2aRDsh
|
|
*/
|
|
|
|
importScripts("workbox-v3.6.1/workbox-sw.js");
|
|
workbox.setConfig({modulePathPrefix: "workbox-v3.6.1"});
|
|
|
|
workbox.core.setCacheNameDetails({prefix: "gatsby-plugin-offline"});
|
|
|
|
workbox.skipWaiting();
|
|
workbox.clientsClaim();
|
|
|
|
/**
|
|
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
|
|
* requests for URLs in the manifest.
|
|
* See https://goo.gl/S9QRab
|
|
*/
|
|
self.__precacheManifest = [
|
|
{
|
|
"url": "webpack-runtime-5ef6e0b762c7f613f390.js"
|
|
},
|
|
{
|
|
"url": "app-8614f59e7b8769d090d4.js"
|
|
},
|
|
{
|
|
"url": "index.html",
|
|
"revision": "91a08533d70f85cb6d06cc9baa82c532"
|
|
},
|
|
{
|
|
"url": "offline-plugin-app-shell-fallback/index.html",
|
|
"revision": "4c9149ddfacd0373d7cbcf836e6c6990"
|
|
},
|
|
{
|
|
"url": "10.16fc2bfdfa7c31dfccba.css"
|
|
},
|
|
{
|
|
"url": "component---src-pages-index-js.4f2261badd32a1741384.css"
|
|
},
|
|
{
|
|
"url": "component---src-pages-index-js-af0ba0656a0e9d0f3486.js"
|
|
},
|
|
{
|
|
"url": "0-da2ba4184031b4f0ea4e.js"
|
|
},
|
|
{
|
|
"url": "10-88df35cc8a07ca552409.js"
|
|
},
|
|
{
|
|
"url": "1-571340e2f260859f028f.js"
|
|
},
|
|
{
|
|
"url": "static/d/173/path---index-6a9-NZuapzHg3X9TaN1iIixfv1W23E.json",
|
|
"revision": "c2508676a2f33ea9f1f0bf472997f9a0"
|
|
},
|
|
{
|
|
"url": "component---src-pages-404-js.4f2261badd32a1741384.css"
|
|
},
|
|
{
|
|
"url": "component---src-pages-404-js-7a2ba83cc3c6ccf65c28.js"
|
|
},
|
|
{
|
|
"url": "static/d/164/path---404-html-516-62a-NZuapzHg3X9TaN1iIixfv1W23E.json",
|
|
"revision": "c2508676a2f33ea9f1f0bf472997f9a0"
|
|
},
|
|
{
|
|
"url": "component---node-modules-gatsby-plugin-offline-2-0-5-gatsby-plugin-offline-app-shell-js-4cf705603aaafc5745e0.js"
|
|
},
|
|
{
|
|
"url": "static/d/520/path---offline-plugin-app-shell-fallback-a-30-c5a-NZuapzHg3X9TaN1iIixfv1W23E.json",
|
|
"revision": "c2508676a2f33ea9f1f0bf472997f9a0"
|
|
},
|
|
{
|
|
"url": "manifest.webmanifest",
|
|
"revision": "55a9292126f8836e91e5d40b0a8cb54f"
|
|
}
|
|
].concat(self.__precacheManifest || []);
|
|
workbox.precaching.suppressWarnings();
|
|
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
|
|
|
|
workbox.routing.registerNavigationRoute("/offline-plugin-app-shell-fallback/index.html", {
|
|
whitelist: [/^[^?]*([^.?]{5}|\.html)(\?.*)?$/],
|
|
blacklist: [/\?(.+&)?no-cache=1$/],
|
|
});
|
|
|
|
workbox.routing.registerRoute(/\.(?:png|jpg|jpeg|webp|svg|gif|tiff|js|woff|woff2|json|css)$/, workbox.strategies.staleWhileRevalidate(), 'GET');
|
|
workbox.routing.registerRoute(/^https:/, workbox.strategies.networkFirst(), 'GET');
|
|
"use strict";
|
|
|
|
/* global workbox */
|
|
self.addEventListener("message", function (event) {
|
|
var api = event.data.api;
|
|
|
|
if (api === "gatsby-runtime-cache") {
|
|
var resources = event.data.resources;
|
|
var cacheName = workbox.core.cacheNames.runtime;
|
|
event.waitUntil(caches.open(cacheName).then(function (cache) {
|
|
return Promise.all(resources.map(function (resource) {
|
|
return cache.add(resource).catch(function (e) {
|
|
// ignore TypeErrors - these are usually due to
|
|
// external resources which don't allow CORS
|
|
if (!(e instanceof TypeError)) throw e;
|
|
});
|
|
}));
|
|
}));
|
|
}
|
|
}); |