change caching rules

This commit is contained in:
Antti Pilto 2018-12-29 12:46:31 +02:00
parent 6d0b5b8d8a
commit b15e79986f
1 changed files with 10 additions and 4 deletions

View File

@ -18,10 +18,16 @@ module.exports = {
stripPrefix: '/home/anzz/code/kanaquiz/',
maximumFileSizeToCacheInBytes: 4194304,
minify: true,
runtimeCaching: [{
handler: 'networkFirst',
urlPattern: /\.(woff2|svg|ttf|eot|woff|html)$/,
}],
runtimeCaching: [
{
handler: 'fastest',
urlPattern: /\.(woff2|svg|ttf|eot|woff)$/,
},
{
handler: 'networkFirst',
urlPattern: /\.html$/
}
],
})
],
module: {