-
Notifications
You must be signed in to change notification settings - Fork 4
/
workbox.config.js
38 lines (37 loc) · 1.09 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
module.exports = {
"globDirectory": "public/",
"globPatterns": [
"**/*.{js,css,ico,woff2,webmanifest}",
"**/images/icons/*",
"**/images/*",
],
manifestTransforms: [
(originalManifest) => {
// Add revision number to fonts - .woff2 format
const manifest = originalManifest.map(
(entry) => {
if (RegExp('.+\.(woff2)').test(entry.url)) {
entry.url = entry.url + '?' + entry.revision
}
return entry
}
);
// Optionally, set warning messages.
const warnings = [];
return {
manifest,
warnings
};
}
],
// 15mb max file size
maximumFileSizeToCacheInBytes: 15 * 1024 * 1024,
globIgnores: [
'**/mix-manifest.json',
'**/vendor/telescope/*',
'**/js/{manifest,vendor}.js',
'**/js/chunks/*',
],
"swDest": "public/service-worker.js",
"swSrc": "resources/js/config/service-worker.js"
};