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

When editing static nodes used in v-for, HMR doesn't work well #7138

Closed
sapphi-red opened this issue Nov 15, 2022 · 1 comment
Closed

When editing static nodes used in v-for, HMR doesn't work well #7138

sapphi-red opened this issue Nov 15, 2022 · 1 comment
Labels
duplicate This issue or pull request already exists scope: hmr

Comments

@sapphi-red
Copy link
Contributor

Vue version

3.2.45

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-fetypr?file=src%2FApp.vue,src%2Fx.vue&terminal=dev

Steps to reproduce

  1. Open reproduction.
  2. Run npm i and npm run dev
  3. Replace Best blog about in x.vue with Best blog abouta

What is expected?

The following content to be shown.

Best blog abouta

changeMechangeMechangeMe

Best blog abouta

changeMechangeMechangeMe

What is actually happening?

The following content was shown.

Best blog about

changeMechangeMechangeMe

Best blog abouta

changeMechangeMechangeMe

Best blog abouta

changeMechangeMechangeMe

System Info

No response

Any additional comments?

If you replace x.vue with the following code and re-run npm dev,

<template>
  <div>
    <p class="m-0">Best blog about</p>
  </div>
</template>

when you replace Best blog about with Best blog abouta, only the second Best blog about is replaced.


Original issue: vitejs/vite#6769

@zhangzhonghe
Copy link
Member

Seems like a duplicate of #6978

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists scope: hmr
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants