fix(pwa): clientsClaim + skipWaiting fuer sofortiges Update bei neuen Deploys
Der bisherige autoUpdate-Mode hat den neuen SW erst beim naechsten Navigations-Event aktiviert -> alte Bundles (mit ASCII-Umlauten) blieben gecached. Mit clientsClaim+skipWaiting wird der neue SW sofort uebernommen und cleanupOutdatedCaches entfernt veraltete Caches.
This commit is contained in:
@@ -7,22 +7,28 @@ export default defineConfig({
|
||||
react(),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
injectRegister: 'auto',
|
||||
workbox: {
|
||||
clientsClaim: true,
|
||||
skipWaiting: true,
|
||||
cleanupOutdatedCaches: true,
|
||||
},
|
||||
manifest: {
|
||||
name: 'Dockly-Pfandsystem',
|
||||
short_name: 'Dockly-Pfand',
|
||||
start_url: '.',
|
||||
display: 'standalone',
|
||||
background_color: '#f8fafc',
|
||||
theme_color: '#4338ca',
|
||||
theme_color: '#051e23',
|
||||
description: 'Digitale Pfand- und Tourenverwaltung',
|
||||
icons: [
|
||||
{ src: 'pfandlogo.png', sizes: '1000x1000', type: 'image/png' },
|
||||
{ src: 'icon-192.png', sizes: '192x192', type: 'image/png' },
|
||||
{ src: 'icon-512.png', sizes: '512x512', type: 'image/png' }
|
||||
]
|
||||
},
|
||||
includeAssets: ['icon-192.png', 'icon-512.png'],
|
||||
includeAssets: ['icon-192.png', 'icon-512.png', 'pfandlogo.png'],
|
||||
manifestFilename: 'manifest.webmanifest',
|
||||
injectRegister: 'auto',
|
||||
})
|
||||
],
|
||||
build: { outDir: 'dist' },
|
||||
|
||||
Reference in New Issue
Block a user