Enable immediate PWA updates and cache cleanup.

Added functionality to immediately activate new Service Worker versions and reload the page upon updates. Enhanced caching configuration in Vite to clean outdated caches and ensure clients use the latest version.
This commit is contained in:
2026-02-06 12:20:52 +01:00
parent 3a66c0cf74
commit 9aa3532dd6
2 changed files with 10 additions and 0 deletions

View File

@@ -28,6 +28,9 @@ export default defineConfig({
workbox: {
// Caching-Default: die App-Shell wird offline verfügbar
globPatterns: ["**/*.{js,css,html,ico,png,jpg,jpeg,svg,webp}"],
cleanupOutdatedCaches: true,
skipWaiting: true,
clientsClaim: true,
}
})
]