From: Evan You Date: Mon, 17 Apr 2023 10:05:17 +0000 (+0800) Subject: fix(hmr): invalidate cached props/emits options on hmr X-Git-Tag: v3.3.0-alpha.10~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b5b384485cf8f6124f6738b89e3d047358f3a11;p=thirdparty%2Fvuejs%2Fcore.git fix(hmr): invalidate cached props/emits options on hmr --- diff --git a/packages/runtime-core/src/hmr.ts b/packages/runtime-core/src/hmr.ts index c5039f62b6..fe8ca132bc 100644 --- a/packages/runtime-core/src/hmr.ts +++ b/packages/runtime-core/src/hmr.ts @@ -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