fix: Clear 2.1.0 frontend PWA cache (#6933)

Co-authored-by: Louis Lam <louislam@users.noreply.github.com>
This commit is contained in:
Copilot
2026-02-18 13:16:49 +08:00
committed by GitHub
co-authored by Louis Lam
parent 6a9f800f58
commit 239ff865bf
2 changed files with 20 additions and 1 deletions
+3 -1
View File
@@ -44,8 +44,10 @@ app.component("FontAwesomeIcon", FontAwesomeIcon);
app.mount("#app");
// Service Worker
// Mainly for Webpush notification
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("/sw.js", { scope: "/" }).catch((error) => {
navigator.serviceWorker.register("/serviceWorker.js", { scope: "/" }).catch((error) => {
console.error("Service worker registration failed:", error);
});
}