When editing static nodes used in `v-for`, HMR doesn't work well
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
- Open reproduction.
- Run
npm i
andnpm run dev
- Replace
Best blog about
inx.vue
withBest 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: https://github.com/vitejs/vite/issues/6769