Skip to content

[Bug]: Vite's HMR doesn't refresh properly with react-router 6.4.* using <BrowserRouter> #9493

@DoctorRainer

Description

@DoctorRainer

What version of React Router are you using?

6.4.2

Steps to Reproduce

Use BrowserRouter in a vite project

Expected Behavior

When editing the code HMR works properly

Actual Behavior

Getting Cannot access 'EditedModuleName' before initialization and Cannot access uninitialized variable.

Everything works fine if I simply replace the 6.4.2 with 6.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions