sw-precache-cra - How to exclude files
DevJett opened this issue · comments
DevJett commented
Is it possible to ignore a file from caching?
I have a meta.json file including a version of the site and I want the service worker to ignore this file.
My attempt
module.exports = {
staticFileGlobs: [
'build/*.html',
'build/manifest.json',
'build/static/js/*.js',
'build/static/css/*.css',
'build/static/media/**',
],
staticFileGlobsIgnorePatterns: [/\.map$/, /meta\.json$/],
swFilePath: 'build/service-worker.js',
stripPrefix: 'build/',
runtimeCaching: [
{
urlPattern: /blog/,
handler: 'networkFirst'
}
]
}
It does not work.
Can anybody help?