Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vite vue3 hmr 热更新失效 #256

Open
yijiang0311 opened this issue Feb 29, 2024 · 3 comments
Open

vite vue3 hmr 热更新失效 #256

yijiang0311 opened this issue Feb 29, 2024 · 3 comments

Comments

@yijiang0311
Copy link

yijiang0311 commented Feb 29, 2024

页面中引用了这个组件后 热更新失效。
使用:

<script setup lang="ts">
import draggable from 'vuedraggable'
const list = ref([1, 2])
</script>

<template>
  <div class="LayerTest">
    <draggable
      :list="list"
      item-key="name"
      class="list-group"
      ghost-class="ghost"
    >
      <template #item="{ element }">
        <div class="list-group-item">
          {{ element }}
        </div>
      </template>
    </draggable>
  </div>
</template>

<style lang="scss" scoped>
</style>

控制台输出的日志如下:
3:59:07 PM [vite] hmr update /src/pages/editor/[id].vue (x2)
好像成功的日志。
但是网页是没有更新到最新的。

@kuzroman
Copy link

updating versions helped me
image

@barisener
Copy link

same issue when use it with quasar framework.

@Yoduh
Copy link

Yoduh commented Jul 25, 2024

same issue when use it with quasar framework.

Currently Quasar CLI scaffolds new projects with Vite v2.x. I resolved the issue with Quasar by upgrading to @quasar/app-vite v2 (which installs Vite v5.x) following their upgrade guide
https://quasar.dev/quasar-cli-vite/upgrade-guide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants