Webpack: really don't serve audio with sw.js

This commit is contained in:
Alex Gleason 2021-09-10 17:43:35 -05:00
parent 3359bda7f8
commit 0aa0828e13
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 4 additions and 2 deletions

View File

@ -31,13 +31,12 @@ module.exports = merge(sharedConfig, {
'**/*_polyfills-*.js', // the user may not need polyfills '**/*_polyfills-*.js', // the user may not need polyfills
'**/*.chunk.js', // only cache chunks when needed '**/*.chunk.js', // only cache chunks when needed
'**/*.woff2', // the user may have system-fonts enabled '**/*.woff2', // the user may have system-fonts enabled
// images/audio can be cached on-demand // images can be cached on-demand
'**/*.png', '**/*.png',
'**/*.jpg', '**/*.jpg',
'**/*.jpeg', '**/*.jpeg',
'**/*.svg', '**/*.svg',
'**/*.mp3', '**/*.mp3',
'**/*.ogg',
], ],
}, },
externals: [ externals: [
@ -66,6 +65,9 @@ module.exports = merge(sharedConfig, {
'**/*.woff', '**/*.woff',
// Sounds return a 206 causing sw.js to crash // Sounds return a 206 causing sw.js to crash
// https://stackoverflow.com/a/66335638 // https://stackoverflow.com/a/66335638
'**/*.ogg',
'**/*.oga',
'**/*.mp3',
'sounds/**/*', 'sounds/**/*',
// Don't cache index.html // Don't cache index.html
'index.html', 'index.html',