aboutsummaryrefslogtreecommitdiffstats
path: root/tools/sw-reload-test.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/sw-reload-test.js')
-rw-r--r--tools/sw-reload-test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/sw-reload-test.js b/tools/sw-reload-test.js
index a869d9d..7a41c7f 100644
--- a/tools/sw-reload-test.js
+++ b/tools/sw-reload-test.js
@@ -32,7 +32,9 @@ const server = Bun.serve({
if (p === '/' || p === '/index.html') return new Response(current.html, { headers: { 'content-type': 'text/html', 'cache-control': 'no-store' } });
// The worker precaches the shell during install and addAll rejects on any
// miss — a 404 here means it never activates and the test proves nothing.
- const f = Bun.file('dist' + p);
+ // The split build names its entry after the token (app-<token>.js), so
+ // a restamped build asks for app-deadbeef….js: the same file.
+ const f = Bun.file('dist' + p.replace(/deadbeef0000\d/, token));
return new Response(f, { headers: { 'cache-control': 'no-store' } });
},
});