From b15e79986f42b020bc2f2520fad9c713d63d9a9f Mon Sep 17 00:00:00 2001 From: Antti Pilto Date: Sat, 29 Dec 2018 12:46:31 +0200 Subject: [PATCH] change caching rules --- webpack.config.prod.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/webpack.config.prod.js b/webpack.config.prod.js index 8ef7863..34eb32d 100644 --- a/webpack.config.prod.js +++ b/webpack.config.prod.js @@ -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: {