Better exclusion for non-critical assets caching in service worker

This commit is contained in:
Eliot Berriot 2020-01-09 13:22:16 +01:00
parent 9b98e8773d
commit 5f0b8cab53
No known key found for this signature in database
GPG key ID: 6B501DFD73514E14
2 changed files with 7 additions and 11 deletions

View file

@ -63,6 +63,12 @@ module.exports = {
// swSrc is required in InjectManifest mode.
swSrc: 'src/service-worker.js',
swDest: 'service-worker.js',
exclude: [
new RegExp('js/locale.*'),
new RegExp('js/moment-locale.*'),
new RegExp('js/admin.*'),
new RegExp('css/admin.*'),
]
},
iconPaths: {
favicon32: 'favicon.png',