-
Notifications
You must be signed in to change notification settings - Fork 1
/
precache-config.js
83 lines (83 loc) · 2.35 KB
/
precache-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
72
73
74
75
76
77
78
79
80
81
82
83
module.exports = {
staticFileGlobs: [
'index.html',
'manifest.json',
'icons/favicon-32x32.png',
'icons/apple-icon.png',
'icons/android-icon-192x192.png',
'icons/favicon-16x16.png',
'icons/safari-pinned-tab.svg',
'icons/ms-icon-144x144.png',
'bower_components/webcomponentsjs/webcomponents-loader.js',
'browserconfig.xml',
'icons/android-icon-36x36.png',
'icons/android-icon-48x48.png',
'icons/android-icon-72x72.png',
'icons/android-icon-96x96.png',
'icons/android-icon-144x144.png',
'icons/android-icon-192x192.png',
'icons/android-icon-256x256.png',
'icons/android-icon-384x384.png',
'icons/android-icon-512x512.png',
'icons/apple-icon-57x57.png',
'icons/apple-icon-60x60.png',
'icons/apple-icon-72x72.png',
'icons/apple-icon-76x76.png,',
'icons/apple-icon-114x114.png',
'icons/apple-icon-120x120.png',
'icons/apple-icon-144x144.png',
'icons/apple-icon-152x152.png',
'icons/apple-icon-180x180.png'
],
navigateFallback: '/index.html',
navigateFallbackWhitelist: [],
skipWaiting: true,
runtimeCaching: [
{
urlPattern: '/',
handler: 'networkFirst',
options: {
cache: {
name: 'src'
}
}
},
{
urlPattern: /src/,
handler: 'networkFirst',
options: {
cache: {
name: 'src'
}
}
},
{
urlPattern: /bower_components/,
handler: 'networkFirst',
options: {
cache: {
name: 'bower'
}
}
},
{
urlPattern: /^https:\/\/api\.imgur\.com\/3\/gallery\/r\/.*\/top\/day\/?/,
handler: 'networkFirst',
options: {
cache: {
name: 'images'
}
}
},
{
urlPattern: /^https:\/\/i\.imgur\.com\/.+/,
handler: 'cacheFirst',
options: {
cache: {
name: 'image',
maxAgeSeconds: 86400
}
}
}
]
};