-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Plain objects states are reset during HMR #2931
Copy link
Copy link
Open
Labels
HMR 🔥Related to Hot Module ReplacementRelated to Hot Module Replacementcontribution welcomehas workaroundThe issue contains a temporary solution to get around the problemThe issue contains a temporary solution to get around the problem✨ enhancementNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
HMR 🔥Related to Hot Module ReplacementRelated to Hot Module Replacementcontribution welcomehas workaroundThe issue contains a temporary solution to get around the problemThe issue contains a temporary solution to get around the problem✨ enhancementNew feature or requestNew feature or request
Reproduction
https://codesandbox.io/p/devbox/competent-feather-24dw95
Steps to reproduce the bug
Expected behavior
State should be preserved.
Actual behavior
State is reset to a default value.
Additional information
The bug happens with Vue 2 and Vite. Not sure if it also applies to Vue 3 due to different reactivity systems.
Screen.Recording.2025-03-10.at.11.57.47.mov