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

Change in component only gets reflected in last component (HMR) #134

Closed
8 of 9 tasks
LukasHechenbergerID opened this issue Mar 22, 2023 · 3 comments
Closed
8 of 9 tasks
Labels
bug: upstream Bug in a dependency of this repository feat: hmr p3-minor-bug 🔨 An edge case that only affects very specific usage (priority)

Comments

@LukasHechenbergerID
Copy link

LukasHechenbergerID commented Mar 22, 2023

Related plugins

Describe the bug

If you change something in a component and use it multiple times (v-for or just multiple components) only the last one gets updated. When you reload the site, all components are correctly updated. When you change something, there is a correct HMR update in the console.

Observation: If there is only one div (so no nested elements) it works.

Reproduction

https://stackblitz.com/edit/vitejs-vite-nvdtpq?file=src/components/TestCard.vue

Steps to reproduce

Change Text in TestCard.vue. Only the last TestCard component will be updated

System Info

System:
    OS: Windows 10 10.0.22621
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700H
    Memory: 1.97 GB / 15.68 GB
  Binaries:
    Node: 18.14.0 - C:\Program Files\nodejs\node.EXE
    npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.22621.1413.0), Chromium (111.0.1661.44)
    Internet Explorer: 11.0.22621.1

Used Package Manager

npm

Logs

No response

Validations

@danielroe
Copy link

Linking for context: vitejs/vite#9679

@sapphi-red
Copy link
Member

I guess this is same with vuejs/core#7138.
If you replace x.vue in the reproduction with below, you'll get a similar result.

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

@sapphi-red sapphi-red added bug: upstream Bug in a dependency of this repository feat: hmr p3-minor-bug 🔨 An edge case that only affects very specific usage (priority) and removed pending triage labels Mar 24, 2023
@sapphi-red
Copy link
Member

I confirmed that this is fixed in Vue 3.3.7.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: upstream Bug in a dependency of this repository feat: hmr p3-minor-bug 🔨 An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

3 participants