-
Notifications
You must be signed in to change notification settings - Fork 0
/
service-worker.js
64 lines (60 loc) · 1.72 KB
/
service-worker.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/**
* 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-v4.2.0/workbox-sw.js");
workbox.setConfig({modulePathPrefix: "workbox-v4.2.0"});
self.addEventListener('message', (event) => {
if (event.data && event.data.type === 'SKIP_WAITING') {
self.skipWaiting();
}
});
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [
{
"url": "data/spacex.json",
"revision": "2150fc7de9da187b7b557ec2e32a8ed6"
},
{
"url": "index.html",
"revision": "d6d97c5ed747117d1d8c787ac00c0631"
},
{
"url": "js/app.js",
"revision": "4173f2ea96ce61e2154411733e620dd7"
},
{
"url": "js/components/card/card.css",
"revision": "b03c1da829f0d2a547c180867fb67c47"
},
{
"url": "js/components/card/card.js",
"revision": "f1fc05b38fd7c03081887fdc3a0d427a"
},
{
"url": "manifest.json",
"revision": "d41d8cd98f00b204e9800998ecf8427e"
},
{
"url": "package.json",
"revision": "99a6011ee57eb34af85ba07f91e206ff"
},
{
"url": "styles/main.css",
"revision": "bc67d9052d6441ba583711ffd896e84b"
}
].concat(self.__precacheManifest || []);
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
workbox.routing.registerRoute("/.(?:jpg|jpeg)$/", new workbox.strategies.CacheFirst(), 'GET');