Skip to content

Commit 4b5b384

Browse files
committed
fix(hmr): invalidate cached props/emits options on hmr
1 parent 4e028b9 commit 4b5b384

File tree

1 file changed

+2
-0
lines changed
  • packages/runtime-core/src

1 file changed

+2
-0
lines changed

packages/runtime-core/src/hmr.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ function reload(id: string, newComp: HMRComponent) {
123123
}
124124

125125
// 3. invalidate options resolution cache
126+
instance.appContext.propsCache.delete(instance.type as any)
127+
instance.appContext.emitsCache.delete(instance.type as any)
126128
instance.appContext.optionsCache.delete(instance.type as any)
127129

128130
// 4. actually update

0 commit comments

Comments
 (0)