使用动态组件时,本地热更新被缓存组件会报异常parentComponent.ctx.deactivate is not a function
Version
3.2.4
Reproduction link
https://codesandbox.io/s/525k8
Steps to reproduce
编辑keep-alive中的组件,保存使之热更新后会报错。 例如,编辑上方codesandbox中示例中components/tab1.vue后保存就会抛出异常
What is expected?
正常热更新,无错误信息
What is actually happening?
热更新时报错,导致热更新失败
This works fine in a vite and vue/cli project. The codesandbox template you used doesn't seem to be up to date or doesn't handle HMR correctly
This works fine in a vite and vue/cli project. The codesandbox template you used doesn't seem to be up to date or doesn't handle HMR correctly
我的项目是vite构建的,在本地使用运行也一样会有这样的错误。
@Iongtao The discussion #1865 could help you?
@Iongtao The discussion #1865 could help you?
我看过了, 但我不太了解这个key该如何使用,官方文档中没有提到component的key这个属性
I have fixed @danyadev's project: https://github.com/ygj6/vue3-bug/tree/bug-2
Hope it could help you.
I have fixed @danyadev's project: https://github.com/ygj6/vue3-bug/tree/bug-2
Hope it could help you.
Version 3.2.20
Steps to reproduce 当a组件被keep-alive缓存,切换到b组件,再切换回a组件,对a组件 setup 进行代码更新,hmr热更新就会报错。
What is expected? 正常热更新,无错误信息
What is actually happening? 热更新时报错,导致热更新失败
@posva @ygj6