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 2ca6058 commit 7236e78
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 7236e78

Please sign in to comment.