Closed henrikvilhelmberglund closed 9 months ago
Hey @henrikvilhelmberglund, AFAIK that's the expected behavior. HMR and fast-refresh are specific to React components. Here are some related issues #5, https://github.com/vitejs/vite-plugin-react/issues/34, vitejs/vite-plugin-react-swc#consistent-components-exports
Hey @henrikvilhelmberglund, AFAIK that's the expected behavior. HMR and fast-refresh are specific to React components. Here are some related issues #5, vitejs/vite-plugin-react#34, vitejs/vite-plugin-react-swc#consistent-components-exports
Ok, thanks!
(I wonder how they got it working in Remix https://twitter.com/CoEliya/status/1716222289845330039
@henrikvilhelmberglund I think it might be Vite based plugin or modification of the react-refresh
plugin in order to make it possible. If it's done with a Vite plugin, there's a possibility of having this added to generouted
plugin as well in the future.
Describe the Bug
No HMR in Action - need to refresh. I think this was fixed before but it doesn't seem to work for me which led to some confusion. I can see a Vite
hmr update
message however the code inside theAction
function isn't updated until I refresh the page.Is there something I might need to do to make this work or is it a bug?
Generouted Version
1.16.1
Your Example Website or App or Reproduction
https://stackblitz.com/edit/github-4pbpiu?file=src%2Fpages%2Flogin-b%2Findex.tsx
Steps to Reproduce the Bug or Issue
login-b
.hello
.Expected Behavior
Expected: You see the text "hello2". Result: You see the text "hello".
Screenshots or Videos
No response
Platform
Additional context
No response