You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
Describe the bug
If there is only a single export in a template file then vite will hmr update that file correctly after making an update.
[vite] hmr update /src/templates/test.tsx
But when there's also another export in the file it instead hmr updates the entry file, causing React state to reset
[vite] hmr update /react-sites-scripts/entry.tsx
Reproduction
https://stackblitz.com/edit/vitejs-vite-krniy8?file=src/App.jsx
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: