Pinia在vite项目中热更新失效的问题 #2088
Unanswered
dongchenKR
asked this question in
Help and Questions
Replies: 2 comments
-
俺也一样 |
Beta Was this translation helpful? Give feedback.
0 replies
-
你理解的没错,vite 应该不需要额外配置就能启用 HMR,如果可以的话,可以提供一个你项目的最小复现仓库,以便查看你的项目配置,定位问题 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
vite项目中,pinia@3.x.x和@4.x.x的版本要能热更新一定要加上下列代码么

if (import.meta.hot) { import.meta.hot.accept(acceptHMRUpdate(useUserStore, import.meta.hot)) }
官方文档
我理解的Vite官方支持,是不是不需要加上上述代码,现在我的vite项目中不加上上述代码,热更新就不起作用,不知道是我理解文档意思有问题还是我本身的项目有问题
Beta Was this translation helpful? Give feedback.
All reactions