diff --git a/public/static/sw.js b/public/static/sw.js index 98c76b2..1cf258c 100644 --- a/public/static/sw.js +++ b/public/static/sw.js @@ -1,5 +1,8 @@ const CACHE = 'gibbz-shell-v1'; -const SHELL = ['/', '/index.html', '/style.css', '/app.js', '/manifest.webmanifest']; +// Only stable, unhashed paths here — the built JS/CSS bundle gets a content +// hash in its filename (e.g. /assets/index-abc123.js), so it can't be listed +// up front. The fetch handler below caches it lazily on first real request. +const SHELL = ['/', '/index.html', '/manifest.webmanifest']; self.addEventListener('install', (event) => { event.waitUntil(caches.open(CACHE).then((cache) => cache.addAll(SHELL)));