From ec02a6ddaf25100c05b5bfb697def5c860860e74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20T=C3=B6rnberg?= Date: Tue, 22 Sep 2026 14:04:06 +0200 Subject: [PATCH] sw --- public/static/sw.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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)));