You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Shared CSS chunks vanish on client-side navigation after #7157 #7172
After #7157, in production builds, navigating client-side between two
routes that share a CSS chunk removes that shared <link rel="stylesheet">
from <head> and never restores it. The destination route renders unstyled.
git clone https://github.com/ZacharyL2/tsr-unmatched-assets-repro
cd tsr-unmatched-assets-repro
# remove pnpm.patchedDependencies in package.json to see the bug
pnpm install && pnpm build && pnpm start
Open /a, click the /b link, see the shared <Card> lose its style.
Cause
Asset.tsx renders <link rel="stylesheet"> without a precedence prop,
so React 19 doesn't treat it as a hoistable resource. On client-side nav,
React unmounts the previous route's <link> during reconciliation, and
Vite's preload helper (which has an in-memory dep cache) refuses to
re-insert it because it considers the module already loaded.
#7157's includeUnmatchedRouteAssets: false is what makes this visible:
the dehydrated manifest no longer carries the destination route's assets,
so useTags() has nothing to render after navigation.
Full diagnosis (3 layers, with file:line refs) in the repro README.
Verified in the repro: this single change fully fixes the bug while
keeping #7157's payload optimization. User-set precedence is respected;
non-stylesheet links unaffected.
Activity
xander-lw commentedon Apr 13, 2026
Just wanted to chime in to confirm I also have this problem currently.
schiller-manuel commentedon Apr 15, 2026
fixed in latest