diff --git a/index.html b/index.html
index d1b2d69..c6c6f5a 100644
--- a/index.html
+++ b/index.html
@@ -108,7 +108,7 @@
Saved weigh-ins
diff --git a/vite.config.ts b/vite.config.ts
index 238754c..6437f01 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -24,6 +24,10 @@ function serviceWorker(): Plugin {
hash.update(name);
hash.update(item.type === "chunk" ? item.code : item.source);
}
+ // index.html isn't in the bundle yet when this runs, so hash its source too:
+ // otherwise an HTML-only change would keep the old offline shell forever.
+ hash.update("index.html");
+ hash.update(readFileSync(here("index.html")));
for (const name of publicFiles) {
hash.update(name);
hash.update(readFileSync(here(`public/${name}`)));