Which project does this relate to?#
Router
Describe the bug#
HMR updates are sent but not applied for changes to __root.tsx. Vite logs show the HMR update is sent (hmr update /src/routes/__root.tsx), but the browser does not reflect the changes. A full page reload is required.
Your Example Website or App#
See below
Steps to Reproduce the Bug or Issue#
- Create fresh app with
npx create-tsrouter-app@latest --template file-router
- Run
npm run dev
- Open http://localhost:3000 in browser
- Edit
src/routes/__root.tsx - add <h1>Test</h1> before <Outlet />
- Save the file
- Observe: Vite logs
hmr update /src/routes/__root.tsx but page does not update
- Manually refresh - now the change appears
Expected behavior#
Changes to __root.tsx should hot-reload without requiring a full page refresh, similar to other route files.
Screenshots or Videos#
No response
Platform#
- Router / Start Version: 1.132.0
- OS: macOS
- Browser: Chrome
- Browser Version: 143.0.0.0
- Bundler: Vite
- Bundler Version: 7.3.0
Additional context#
No response
📝 CodeRabbit Plan Mode#
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Similar Issues
Possible Duplicates
Related Issues
🔗 Related PRs
TanStack/router#5317 - fix: prevent HMR to throw error about entrypoints [merged] TanStack/router#5389 - fix: navigate() respects rewrites when reloadDocument=true [merged] TanStack/router#5533 - docs: Update migrate-from-next-js.md [merged] TanStack/router#5686 - fix(router-core): Catch errors thrown during hydrate [merged] TanStack/router#5710 - fix: route HMR handling [merged]
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!