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

HMR not working properly when div is nested inside li tag #2022

Closed
2 of 3 tasks
mornir opened this issue Feb 14, 2021 · 0 comments
Closed
2 of 3 tasks

HMR not working properly when div is nested inside li tag #2022

mornir opened this issue Feb 14, 2021 · 0 comments

Comments

@mornir
Copy link

mornir commented Feb 14, 2021

⚠️ IMPORTANT ⚠️ Please check the following list before proceeding. If you ignore this issue template, your issue will be directly closed.

  • Read the docs.
  • Use Vite >=2.0. (1.x is no longer supported)
  • If the issue is related to 1.x -> 2.0 upgrade, read the Migration Guide first.

Describe the bug

In the following code snippet, when I make changes inside the div tag and save my code, only the last item gets updated in the browser. I have to refresh the page for the changes to be applied to all the other items.

    <ul>
      <li v-for="todo in todos" :key="todo.id">
        <span>{{ todo.text }}</span>
        <div>
          <!-- Only last item is updated -->
          <button>Archive</button>
        </div>
      </li>
    </ul>

(Maybe I'm missing something obvious here? From what I read, nesting div inside li is valid HTML.)

Reproduction

https://github.com/mornir/vite-project

System Info

  • vite version: 2.0.0-beta.69
  • Operating System: Windows 10
  • Node version: 14.15.0
  • Package manager (npm/yarn/pnpm) and version: yarn, v1.22.5

Thanks for this awesome tool! ❤

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.