Skip to content

HMR adds changes twice when using teleport #3302

Closed
@martinszeltins

Description

@martinszeltins

Version

3.0.6

Reproduction link

https://github.com/martinszeltins/vue-hmr-teleport-duplicates

Steps to reproduce

https://github.com/martinszeltins/vue-hmr-teleport-duplicates

  1. Clone the repo, install dependencies and run npm run dev
  2. Open the app in the browser and click on "Show menu" button. Menu will open.
  3. Now go to App.vue and after <div>3</div> add one more item <div>4</div>
  4. Save the file and look at the browser - you will see that hmr added <div>4</div> twice!

What is expected?

The expected result after adding a new item would be this:

<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>

What is actually happening?

Instead HMR has added 4 twice!

<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>4</div>

I'm using Vite 2.0.3 (latest)

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions