-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathswConfig.js
85 lines (84 loc) · 1.9 KB
/
swConfig.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
84
85
const src = 'public/src';
const materialize = 'node_modules/materialize-css/dist';
const animate = 'node_modules/animate.css';
const intro = 'node_modules/intro.js/minified';
module.exports = {
staticFileGlobs: [
`${src}/stylesheets/**.css`,
'/**.html',
`${src}/images/**.*`,
`${src}/images/favicon32x32.ico`,
`${src}/manifest.json`,
`${src}/images/icons/**.*`,
`${src}/javascript/**.js`,
`${animate}/animate.min.css`,
`${intro}/intro.min.js`,
`${intro}/intro.min.js`,
`${intro}/introjs.min.css`,
`${materialize}/css/materialize.min.css`,
`${materialize}/js/materialize.min.js`,
],
stripPrefixMulti: {
'public/src/images/favicon32x32.ico': '/',
'public/src/': '/',
'node_modules/materialize-css/dist/': '/',
'node_modules/animate.css/': '/',
'node_modules/intro.js/minified/': '/',
},
runtimeCaching: [{
urlPattern: /fonts\.googleapis\.com/,
handler: 'cacheFirst',
},
{
urlPattern: /use\.fontawesome\.com/,
handler: 'cacheFirst',
},
{
urlPattern: /fonts\.gstatic\.com/,
handler: 'cacheFirst',
},
{
urlPattern: /\.googleusercontent\.com/,
handler: 'networkFirst',
},
{
urlPattern: /\.licdn\.com/,
handler: 'networkFirst',
},
{
urlPattern: /\/dashboard/,
handler: 'networkFirst',
},
{
urlPattern: /\/auth/,
handler: 'networkFirst',
},
{
urlPattern: 'https://localhost:1998/',
handler: 'networkFirst',
},
{
urlPattern: 'http://localhost:1998/',
handler: 'networkFirst',
},
{
urlPattern: /socio-konnect\.herokuapp\.com/,
handler: 'networkFirst',
},
{
urlPattern: /\.fbsbx\.com/,
handler: 'networkFirst',
},
{
urlPattern: /\.twimg\.com/,
handler: 'networkFirst',
},
{
urlPattern: /\.pinimg\.com/,
handler: 'networkFirst',
},
{
urlPattern: /\.githubusercontent\.com/,
handler: 'networkFirst',
}],
};