In my Vite + Vue3 project, HMR works fine in the local development environment. However, when I import a third-party library that depends on @vueuse/core, HMR stops working.
After debugging, I found that:
- If I comment out the third-party library, HMR works normally.
- If I import my own library (which I developed), HMR also stops working.
- If I remove @vueuse/core from my library’s dependencies, HMR works again.
I suspect this might be due to different versions of Vue core dependencies between my project and @vueuse/core.
Steps to Reproduce
- Create a Vite + Vue3 project.
- List item Install and import a library that depends on @vueuse/core.
- Observe that HMR no longer works.
- Remove @vueuse/core from the library’s dependencies and see that HMR works again.
Environment
- Vite: 4.4.9
- Vue: 3.3.4
- @vueuse/core: 12.7.0
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745107173a4611628.html
评论列表(0条)