forked from evgeny-nadymov/telegram-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sw-config.js
36 lines (35 loc) · 1.21 KB
/
sw-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
/*
* Copyright (c) 2018-present, Evgeny Nadymov
*
* This source code is licensed under the GPL v.3.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
module.exports = {
swFilePath: './build/service-worker.js',
cacheId: 'sw-precache-webpack-plugin',
dontCacheBustUrlsMatching: /\.\w{8}\./,
navigateFallback: '/index.html',
navigateFallbackWhitelist: [ /^(?!\/__).*/ ],
staticFileGlobsIgnorePatterns: [ /\.map$/, /asset-manifest\.json$/ ],
staticFileGlobs:
[ './build/rlottie/*.*',
'./build/libwebp/*.*',
'./build/**/**.html',
'./build/static/js/*.js',
'./build/static/css/*.css',
'./build/static/media/*.*',
'./build/*.wasm',
'./build/*.worker.js',
'./build/tdweb.js',
'./build/*.css',
'./build/*.mp3',
'./build/*.jpg',
'./build/*.png',
'./build/data/*.*'],
stripPrefix: './build',
replacePrefix: '/telegram-react',
maximumFileSizeToCacheInBytes: 10485760,
templateFilePath: './service-worker.tmpl',
importScripts: ['./custom-service-worker.js'],
ignoreUrlParametersMatching: [/./]
};