WenJia
WenJia

Reputation: 97

Vite HMR Not Working When Using a Library That Depends on @vueuse/core

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:

I suspect this might be due to different versions of Vue core dependencies between my project and @vueuse/core.

Steps to Reproduce

  1. Create a Vite + Vue3 project.
  2. List item Install and import a library that depends on @vueuse/core.
  3. Observe that HMR no longer works.
  4. Remove @vueuse/core from the library’s dependencies and see that HMR works again.

Environment

Upvotes: 1

Views: 10

Answers (0)

Related Questions