pwa optimize & fixes

This commit is contained in:
2023-10-27 16:36:25 +02:00
parent e515203557
commit 5e43ece1aa
20 changed files with 81 additions and 42 deletions
+7
View File
@@ -20,6 +20,12 @@ export default defineConfig({
VitePWA({
registerType: 'autoUpdate',
devOptions: {
suppressWarnings: true,
enabled: true,
type: 'classic',
},
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img,woff,woff2}'],
@@ -44,6 +50,7 @@ export default defineConfig({
options: {
cacheName: 'spythere-api-cache',
expiration: {
maxEntries: 150,
maxAgeSeconds: 60 * 60 * 24, // <== 1 day
},
cacheableResponse: {