-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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 adds changes twice when using teleport #3302
Comments
same issue in latest @vue/cli. |
The issue is a bit like 376883d, the difference is that this issue brings duplicate mounting instead of unmounting. When performing HMR updates, we deliberately fall back to the non-optimized mode, like this https://github.com/vuejs/vue-next/blob/012dc5a30366d3325c464c3b62da123147788237/packages/runtime-core/src/renderer.ts#L893-L898. Edit: I adjusted the implementation to make it more consistent |
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
npm run dev
App.vue
and after<div>3</div>
add one more item<div>4</div>
<div>4</div>
twice!What is expected?
The expected result after adding a new item would be this:
What is actually happening?
Instead HMR has added 4 twice!
I'm using Vite 2.0.3 (latest)
The text was updated successfully, but these errors were encountered: