diff --git a/vite.config.ts b/vite.config.ts index d347c76..8161881 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -12,6 +12,8 @@ export default defineConfig({ VitePWA({ registerType: 'autoUpdate', // Automatically updates the service worker when a new version is available workbox: { + skipWaiting: true, //makes the new worker call skip waiting + clientsClaim: true, //makes it claim control of clients as soon as it activates globPatterns: ['**/*.{js,css,html,png,jpg,svg}'], // Cache all common asset types maximumFileSizeToCacheInBytes: 20 * 1024 * 1024, // 20 MiB cleanupOutdatedCaches: true,