HMR full reload
Hot Module Replacement (HMR) updates are always causing a full reload instead of updating modules incrementally. This happens even when changing something as basic as style.
Is this normal or is there something I'm missing?
3 Replies
absent-sapphire•6mo ago
I noticed this too.
This is what I get from Vite:
conscious-sapphire•6mo ago
You could install react-refresh and integrate it with eslint. You will then get warnings when you have something setup in your code that is against hmr.
Common pattern is, that tsx file do only Export Components. If you export a const in the same file, that is e.g. against hmr.
exotic-emeraldOP•6mo ago
Thanks @LenB_ can this be achieved with Biomejs … that’s what I’m using for linting and formatting and I can’t find it on their doc.