Content-hashed pkg assets (hash-files) so stale bundles can't pair with new wasm
Test / test (push) Successful in 26s
Test / test (push) Successful in 26s
An iPhone kept a heuristically-cached portal.js across three releases (cached before Cache-Control: no-cache existed) and loaded it against fresh wasm - its snippet imports 404'd, hydration never started, and the gesture field never mounted. With hash-files = true every pkg file is content-named and the freshly served page references exactly its own bundle; hash.txt ships beside the binary (leptos resolves it next to current_exe), the shell links the stylesheet through HashedStylesheet, and instances set LEPTOS_HASH_FILES=true. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
d403eda5da
commit
330ab11fe9
@@ -131,6 +131,12 @@ bin-default-features = false
|
||||
lib-features = ["hydrate"]
|
||||
lib-default-features = false
|
||||
lib-profile-release = "wasm-release"
|
||||
# Content-hashed pkg names (portal.<hash>.js/wasm/css) + hash.txt: a
|
||||
# freshly served page can never reference a stale cached bundle - an
|
||||
# iPhone kept a heuristically-cached portal.js across three releases
|
||||
# and paired it with new wasm, silently killing hydration. Runtime
|
||||
# needs LEPTOS_HASH_FILES=true (set in each content repo's deploy env).
|
||||
hash-files = true
|
||||
|
||||
# cargo release <level> is how a portal version is cut: bump, commit,
|
||||
# tag v{{version}}, push. CI (publish.yml) reacts to the tag and
|
||||
|
||||
Reference in New Issue
Block a user