fix: recover stale service worker clients

This commit is contained in:
2026-08-03 00:47:00 +05:30
parent 13aa75c366
commit eb325a8412
3 changed files with 46 additions and 2 deletions
+4 -1
View File
@@ -1,6 +1,9 @@
import type { AppConfig } from "@wrnexus/styles";
const config: AppConfig = {
// Repair clients that are still controlled by an older cached service worker.
// This can be removed after every preview client has advanced beyond v3.
head: '<script src="/pwa-recover.js" defer></script>',
mobile: {
enabled: true,
appId: "com.example.wrnexusjs",
@@ -15,7 +18,7 @@ const config: AppConfig = {
pwa: {
name: "WRNexusJS Documentation",
shortName: "WRNexusJS Docs",
cacheName: "wrnexus-pwa-v2",
cacheName: "wrnexus-pwa-v3",
runtimeCaching: [
{
pattern: "^https://wrnexusjs\\.dev/",