From dff807aaebd196f547315e017905e438283032e6 Mon Sep 17 00:00:00 2001 From: Deepjyoti Barman Date: Tue, 30 Mar 2021 19:40:45 +0530 Subject: [PATCH] Add glob options to the worker config --- vue.config.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/vue.config.js b/vue.config.js index ab16ee6..0178014 100644 --- a/vue.config.js +++ b/vue.config.js @@ -12,6 +12,15 @@ module.exports = { workboxOptions: { exclude: [/_redirects/, /^.*map$/], swDest: "sw.js", + globDirectory: "dist/", + globPatterns: ["**/*.{ico,png,svg,html,js,css,json,txt,md}"], + globIgnores: ["**/index.html"], + runtimeCaching: [ + { + urlPattern: /\.(?:png|jpg|svg|json|md|js|css|html)$/, + handler: "StaleWhileRevalidate" + } + ], navigateFallback: "index.html", cleanupOutdatedCaches: true },