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
In the development environment of our project with Vite + Vue2.7 + Vuex + Vue Router, we encountered an issue where there is a circular reference between src/store/modules/user.js and src/router/index.js. Modifying any JSX code seems to cause the state of src/store referenced elsewhere (src/utils/permission.js) to be reset after HMR. We have to refresh the page, which is very bad for the development experience.
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 vuejs/core instead.
Describe the bug
In the development environment of our project with Vite + Vue2.7 + Vuex + Vue Router, we encountered an issue where there is a circular reference between
src/store/modules/user.js
andsrc/router/index.js
. Modifying any JSX code seems to cause the state ofsrc/store
referenced elsewhere (src/utils/permission.js
) to be reset after HMR. We have to refresh the page, which is very bad for the development experience.Reproduction
https://github.com/youthug/vite-vuex-state-repro.git
Steps to reproduce
git clone https://github.com/youthug/vite-vuex-state-repro.git cd vite-vuex-state-repro yarn yarn dev
src/components
folder to see the changes on the page.System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: