Skip to content

HMR updates not applied for __root.tsx changes (requires full reload) #6195

Closed

Description

@longfellowone

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

  1. Create fresh app with npx create-tsrouter-app@latest --template file-router
  2. Run npm run dev
  3. Open http://localhost:3000 in browser
  4. Edit src/routes/__root.tsx - add <h1>Test</h1> before <Outlet />
  5. Save the file
  6. Observe: Vite logs hmr update /src/routes/__root.tsx but page does not update
  7. 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

Activity

  1. coderabbitai commented on Dec 23, 2025

    @coderabbitai
    Contributor

    📝 CodeRabbit Plan Mode

    Generate an implementation plan and prompts that you can use with your favorite coding agent.

    • Create Plan
    Examples

    🔗 Similar Issues

    Possible Duplicates

    • 3917

    Related Issues

    🔗 Related PRs

    #5317 - fix: prevent HMR to throw error about entrypoints [merged]
    #5389 - fix: navigate() respects rewrites when reloadDocument=true [merged]
    #5533 - docs: Update migrate-from-next-js.md [merged]
    #5686 - fix(router-core): Catch errors thrown during hydrate [merged]
    #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:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord or schedule a call!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions