From 202567bf058880a96d6afe90a552bd99cdf2ca3f Mon Sep 17 00:00:00 2001 From: Evie Gauthier Date: Mon, 6 Apr 2026 12:35:25 -0400 Subject: [PATCH] fix(pwa): re-enable Workbox precaching (remove if guard and injectionPoint override) --- src/sw.ts | 4 +--- vite.config.ts | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/sw.ts b/src/sw.ts index bd09cd8d3..d843963bd 100644 --- a/src/sw.ts +++ b/src/sw.ts @@ -902,7 +902,5 @@ self.addEventListener('notificationclick', (event: NotificationEvent) => { ); }); -if (self.__WB_MANIFEST) { - precacheAndRoute(self.__WB_MANIFEST); -} +precacheAndRoute(self.__WB_MANIFEST); cleanupOutdatedCaches(); diff --git a/vite.config.ts b/vite.config.ts index a130df507..9b32ceac9 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -176,7 +176,11 @@ export default defineConfig(({ command }) => ({ injectRegister: false, manifest: false, injectManifest: { - injectionPoint: undefined, + // element-call is a self-contained embedded app; exclude its large assets + // from the SW precache manifest (they are not part of the Sable shell). + globIgnores: ['public/element-call/**'], + // The app's own crypto WASM and main bundle exceed the 2 MiB default. + maximumFileSizeToCacheInBytes: 10 * 1024 * 1024, // 10 MiB }, devOptions: { enabled: true,