From 0aa0828e130fd0f6139f8ca24f7ac0d480738099 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 10 Sep 2021 17:43:35 -0500 Subject: [PATCH] Webpack: really don't serve audio with sw.js --- webpack/production.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/webpack/production.js b/webpack/production.js index 9968a2ca9..181d533e6 100644 --- a/webpack/production.js +++ b/webpack/production.js @@ -31,13 +31,12 @@ module.exports = merge(sharedConfig, { '**/*_polyfills-*.js', // the user may not need polyfills '**/*.chunk.js', // only cache chunks when needed '**/*.woff2', // the user may have system-fonts enabled - // images/audio can be cached on-demand + // images can be cached on-demand '**/*.png', '**/*.jpg', '**/*.jpeg', '**/*.svg', '**/*.mp3', - '**/*.ogg', ], }, externals: [ @@ -66,6 +65,9 @@ module.exports = merge(sharedConfig, { '**/*.woff', // Sounds return a 206 causing sw.js to crash // https://stackoverflow.com/a/66335638 + '**/*.ogg', + '**/*.oga', + '**/*.mp3', 'sounds/**/*', // Don't cache index.html 'index.html',