fix: add skipWaiting/clientsClaim to VitePWA workbox config
Root cause: SW remained in waiting phase after redeploy, serving stale precached assets. Without skipWaiting/clientsClaim the old SW persisted and controlled the page even after a new SW was installed. Fixes blank-page regression where React never mounted on login.
This commit is contained in:
@@ -39,6 +39,8 @@ export default defineConfig({
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
workbox: {
|
workbox: {
|
||||||
|
skipWaiting: true,
|
||||||
|
clientsClaim: true,
|
||||||
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
|
globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"],
|
||||||
navigateFallbackDenylist: [
|
navigateFallbackDenylist: [
|
||||||
/^\/api\/auth\//,
|
/^\/api\/auth\//,
|
||||||
|
|||||||
Reference in New Issue
Block a user