Skip to content

Commit

Permalink
Add glob options to the worker config
Browse files Browse the repository at this point in the history
  • Loading branch information
deepjyoti30 committed Mar 30, 2021
1 parent 1ae06aa commit dff807a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit dff807a

Please sign in to comment.