fix(hmr): fix hmr when global mixins are used

fix #4174
This commit is contained in:
Evan You
2021-07-22 10:53:59 -04:00
parent fe58bae412
commit db3f57a392
2 changed files with 44 additions and 1 deletions

View File

@@ -130,6 +130,9 @@ function reload(id: string, newComp: ComponentOptions | ClassComponent) {
}
Array.from(instances).forEach(instance => {
// invalidate options resolution cache
instance.appContext.optionsCache.delete(instance.type as any)
if (instance.parent) {
// 4. Force the parent instance to re-render. This will cause all updated
// components to be unmounted and re-mounted. Queue the update so that we