This repository has been archived by the owner on Jun 9, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworkbox-config.js
71 lines (71 loc) · 1.84 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
module.exports = {
"globDirectory": "build/",
"globPatterns": [
"**/*.{json,png,ico,html,js,xml,css}"
],
"swDest": "build/sw.js",
"navigateFallback": '/index.html',
"runtimeCaching": [
{
urlPattern: /^https:\/\/cdnjs\.cloudflare\.com\/ajax\/libs\/slick-carousel\/1\.6\.0\/slick\.min\.css/,
handler: 'cacheFirst',
options: {
cacheName: 'slick-min',
expiration: {
maxEntries: 80,
maxAgeSeconds: 60 * 60 * 24
}
}
},
{
urlPattern: /^https:\/\/cdnjs\.cloudflare\.com\/ajax\/libs\/font-awesome\/4.7.0\/css\/font-awesome.min.css/,
handler: 'cacheFirst',
options: {
cacheName: 'font-awesome',
expiration: {
maxEntries: 80,
maxAgeSeconds: 60 * 60 * 24
}
}
},
{
urlPattern: /^https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/slick-carousel\/1.6.0\/slick-theme.min.css/,
handler: 'cacheFirst',
options: {
cacheName: 'slick-theme',
expiration: {
maxEntries: 80,
maxAgeSeconds: 60 * 60 * 24
}
}
},
{
urlPattern: /^https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/balance-text\/3.2.0\/balancetext.min.js/,
handler: 'cacheFirst',
options: {
cacheName: 'balancetext',
expiration: {
maxEntries: 80,
maxAgeSeconds: 60 * 60 * 24
}
}
},{
urlPattern: /^https:\/\/api\.digitalcube\.jp\/wp-content\/uploads\/.*\.(jpeg|jpg|png)/,
handler: 'cacheFirst',
options: {
cacheName: 'wp-images',
expiration: {
maxEntries: 80,
maxAgeSeconds: 60 * 60 * 24
}
}
},
{
urlPattern: /^https:\/\/api\.digitalcube\.jp\/wp-json\/wp/,
handler: 'staleWhileRevalidate',
options: {
cacheName: 'wp-api'
}
}
]
};