Skip to content

Commit

Permalink
optimize workbox asset caching
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanseifert committed May 3, 2024
1 parent 6b9a39c commit 3d10bcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ export default defineConfig({
filename: 'service-worker.js',
// cache all asset imports
workbox: {
globPatterns: ["**/*"]
globPatterns: ["**/*.{js,css,html,ico,svg,png,jpg,webp}"],
maximumFileSizeToCacheInBytes: 5242880
},
// include all static assets
includeAssets: [
Expand Down

0 comments on commit 3d10bcb

Please sign in to comment.