diff --git a/packages/runtime-core/src/componentProps.ts b/packages/runtime-core/src/componentProps.ts index d86eb969894..3d16a614d4f 100644 --- a/packages/runtime-core/src/componentProps.ts +++ b/packages/runtime-core/src/componentProps.ts @@ -38,6 +38,7 @@ import { createPropsDefaultThis } from './compat/props' import { isCompatEnabled, softAssertCompatEnabled } from './compat/compatConfig' import { DeprecationTypes } from './compat/compatConfig' import { shouldSkipAttr } from './compat/attrsFallthrough' +import { isHmrUpdating } from './hmr' export type ComponentPropsOptions

= | ComponentObjectPropsOptions

@@ -195,11 +196,7 @@ export function updateProps( // always force full diff in dev // - #1942 if hmr is enabled with sfc component // - vite#872 non-sfc component used by sfc component - !( - __DEV__ && - (instance.type.__hmrId || - (instance.parent && instance.parent.type.__hmrId)) - ) && + !(__DEV__ && isHmrUpdating) && (optimized || patchFlag > 0) && !(patchFlag & PatchFlags.FULL_PROPS) ) {