SIGN IN SIGN UP
withastro / astro UNCLAIMED

The web framework for content-driven websites. ⭐️ Star to support our work!

0 0 127 TypeScript

Invalidate route cache when module identity changes after HMR (#16776)

The route cache stores getStaticPaths() return values keyed by route path,
but never checked whether the module that produced those values had been
re-evaluated. After HMR, components passed as props via getStaticPaths()
remained stale even on manual refresh.

Store the module reference in the cache entry and compare identity on
lookup. A new module object (from a fresh import after HMR) causes the
cache to miss, re-calling getStaticPaths() with updated references.

Fixes #16522
M
Matthew Phillips committed
3d10b5e16256ff9999e757f86cf2c4f04c36a311
Parent: 1056891
Committed by GitHub <noreply@github.com> on 5/19/2026, 1:13:56 PM