Skip to content

Commit

Permalink
fix(hmr): invalidate cached props/emits options on hmr
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Apr 17, 2023
1 parent 4e028b9 commit 4b5b384
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/runtime-core/src/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ function reload(id: string, newComp: HMRComponent) {
}

// 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)

// 4. actually update
Expand Down

0 comments on commit 4b5b384

Please sign in to comment.