HMR does not work with lazily-loaded class-based components, react-router and redux #136
Open
7 tasks done
Labels
bug
Something isn't working
Describe the bug
Hi, I'm having issues with HMR not reloading certain modules.
The issue seems to only occur when using react-router, react-redux and a lazily-loaded class-based component.
In the attached minimal reproduction, editing the "src/components/LazyClassComponent.tsx" file (route: "/d") triggers a hot module reload but does not update the page, requiring a hard refresh.
I'm using Firefox 116.0.2 on Windows, running Vite in WSL.
Reproduction
https://github.com/printfn/vite-hmr-test
Steps to reproduce
Run
npm install
followed bynpm run dev
. Open the page in the browser and navigate to the '/d' link. Edit the "src/components/LazyClassComponent.tsx" file. In the browser console it will say[vite] hot updated: /src/Router.tsx
, but the page content does not actually update. If you try the same thing on any of the other three routes, it will update as expected.System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: