fix: SW cache bust — add JS modules + locales to STATIC_ASSETS
Root cause: cacheFirstStatic() in sw.js was caching viewer.js, i18n.js, auth.js, dashboard.js, and locale JSON files under the old CACHE_VERSION. Even after rebuild, the old SW served stale cached files without data-i18n attributes, so dashboard stayed in French. Changes: - sw.js: add js/viewer.js, js/i18n.js, js/auth.js, js/dashboard.js, js/app.js, locales/en.json, locales/fr.json to STATIC_ASSETS so they are versioned with CACHE_VERSION and properly invalidated - CACHE_VERSION already bumped to v5 in previous commit Manual fix for existing clients: Chrome → F12 → Application → Service Workers → Unregister Or: chrome://serviceworker-internals/ → Unregister Then Ctrl+Shift+R to hard-refresh
This commit is contained in:
+8
-1
@@ -10,7 +10,14 @@ const STATIC_ASSETS = [
|
||||
'/static/index.html',
|
||||
'/static/app.js',
|
||||
'/static/style.css',
|
||||
'/static/manifest.json'
|
||||
'/static/manifest.json',
|
||||
'/static/js/viewer.js',
|
||||
'/static/js/i18n.js',
|
||||
'/static/js/auth.js',
|
||||
'/static/js/dashboard.js',
|
||||
'/static/js/app.js',
|
||||
'/static/locales/en.json',
|
||||
'/static/locales/fr.json'
|
||||
];
|
||||
|
||||
/* ── Install ── */
|
||||
|
||||
Reference in New Issue
Block a user