fix(hmr): invalidate cached props/emits options on hmr

This commit is contained in:
Evan You 2023-04-17 18:05:17 +08:00
parent 4e028b9669
commit 4b5b384485
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ function reload(id: string, newComp: HMRComponent) {
} }
// 3. invalidate options resolution cache // 3. invalidate options resolution cache
instance.appContext.propsCache.delete(instance.type as any)
instance.appContext.emitsCache.delete(instance.type as any)
instance.appContext.optionsCache.delete(instance.type as any) instance.appContext.optionsCache.delete(instance.type as any)
// 4. actually update // 4. actually update