-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathworkbox-config.js
51 lines (51 loc) · 1.31 KB
/
workbox-config.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
module.exports = {
"globDirectory": "resources/public/prod",
"globPatterns": [
"js/compiled/*.js"
],
"modifyUrlPrefix": {
"js/compiled": "/static/js/compiled",
},
"swDest": "resources/public/prod/sw.js",
"runtimeCaching": [
{
"urlPattern": /\//,
"handler": "networkFirst",
"options": {
"cacheableResponse": {
"statuses": [0, 200],
"headers": {
"Content-type": "text/html; charset=utf-8",
},
},
},
},
{
"urlPattern": /^https\:\/\/use\.fontawesome\.com\/releases\//,
"handler": "cacheFirst",
"options": {
"cacheableResponse": {
"statuses": [0, 200],
},
},
},
{
"urlPattern": /^https\:\/\/api\.github\.com\//,
"handler": "networkFirst",
"options": {
"cacheableResponse": {
"statuses": [0, 200],
},
},
},
{
"urlPattern": /^https\:\/\/avatars0\.githubusercontent\.com\//,
"handler": "cacheFirst",
"options": {
"cacheableResponse": {
"statuses": [0, 200],
},
},
},
],
};