diff --git a/site/src/service-worker.js b/site/src/service-worker.js index 94806020fb..e226670753 100644 --- a/site/src/service-worker.js +++ b/site/src/service-worker.js @@ -4,7 +4,12 @@ const ASSETS = `cache${timestamp}`; // `shell` is an array of all the files generated by Rollup, // `files` is an array of everything in the `static` directory -const to_cache = shell.concat(files); +const to_cache = shell.concat(files.filter(file => { + const basename = file.split('/').pop(); + if (basename[0] === '.') return false; // .DS_Store and friends + if (basename.endsWith('.mp3')) return false; // TODO others? + return true; +})); const cached = new Set(to_cache); self.addEventListener('install', event => {