aboutsummaryrefslogtreecommitdiffstats
path: root/tools/sw-reload-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-07 08:26:57 -0700
committerAdam Soltys <[email protected]>2026-10-07 08:26:57 -0700
commit190d27995e751ad3f64d84832ea3358765bc5c63 (patch)
tree142c75b409c4a78903b5a71a316a9b41e02dd006 /tools/sw-reload-test.js
parentf247eb1de2941c4ef51378f0b773d1d2a1434c7f (diff)
downloadcoinosv3-190d27995e751ad3f64d84832ea3358765bc5c63.tar.gz
coinosv3-190d27995e751ad3f64d84832ea3358765bc5c63.zip
unread-dot, sw-reload tests follow the bottom nav and the split build
- unread-dot: the front door's way to import is Create a new wallet → Have an existing seed; the dot is the Messages bottom-nav button's - sw-reload: the split build loads app-<token>.js, so a restamped build asks for app-deadbeef….js; serve the real entry for it Co-Authored-By: Claude Opus 5.5 <[email protected]>
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' } });
},
});