From c78450cf191f2436f744414ba941fdf3283e75c8 Mon Sep 17 00:00:00 2001 From: shedaniel Date: Thu, 8 Jun 2023 19:11:59 +0800 Subject: [PATCH] Try to fix service worker --- frontend/vite.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index de24c51..4eef594 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -13,6 +13,7 @@ export default defineConfig({ plugins: [ vue(), VitePWA({ + registerType: "autoUpdate", includeAssets: [ "favicon.ico", "favicon-32x32.png", @@ -43,8 +44,9 @@ export default defineConfig({ display: "standalone", }, workbox: { - cleanupOutdatedCaches: false, + cleanupOutdatedCaches: true, sourcemap: true, + skipWaiting: true, }, }), prismjsPlugin({