Skip to content

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

@longfellowone

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

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