diff --git a/.changeset/workbox-precaching.md b/.changeset/workbox-precaching.md new file mode 100644 index 000000000..2537469a5 --- /dev/null +++ b/.changeset/workbox-precaching.md @@ -0,0 +1,5 @@ +--- +default: patch +--- + +Fix Workbox precaching by removing injectionPoint override that was silently disabling all precache entries 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,