From 7829e072fd48b3897227e793266b171ff09373fb Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 15 Feb 2024 11:09:51 -0500 Subject: [PATCH] Emscripten: Update wz-workbox-config.js --- platforms/emscripten/wz-workbox-config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platforms/emscripten/wz-workbox-config.js b/platforms/emscripten/wz-workbox-config.js index b98ec28bd64..61bbc69cead 100644 --- a/platforms/emscripten/wz-workbox-config.js +++ b/platforms/emscripten/wz-workbox-config.js @@ -19,6 +19,7 @@ module.exports = { ], globIgnores: [ '**\/node_modules\/**\/*', + '**/service-worker.js', // do not precache the service-worker file (which shouldn't exist when this is run, but just in case) '**/*.data', // do not precache .data files, which are often huge '**/*.debug.wasm', // do not precache wasm debug symbols '**\/music\/**\/*', // do not precache music (which is optional) @@ -74,7 +75,7 @@ module.exports = { // Backup on-demand caching of any additional utilized CSS and JS files for offline use // (useful in case someone forgot to update the additionalManifestEntries above) { - urlPattern: ({url}) => (url.pathname.endsWith('.js') || url.pathname.endsWith('.css')) && url.origin !== 'https://static.cloudflareinsights.com', + urlPattern: ({url}) => (url.pathname.endsWith('.js') || url.pathname.endsWith('.css')) && !url.pathname.endsWith('service-worker.js') && url.origin !== 'https://static.cloudflareinsights.com', handler: 'NetworkFirst', options: { cacheName: 'additional-dependencies',