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 },