close #https://github.com/vitejs/vite/issues/872
const [options] = instance.propsOptions
if (
- // always force full diff if hmr is enabled
- !(__DEV__ && instance.type.__hmrId) &&
+ // 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))
+ ) &&
(optimized || patchFlag > 0) &&
!(patchFlag & PatchFlags.FULL_PROPS)
) {