diff --git a/packages/runtime-core/src/components/KeepAlive.ts b/packages/runtime-core/src/components/KeepAlive.ts index 9605d79150c..3fec48140fc 100644 --- a/packages/runtime-core/src/components/KeepAlive.ts +++ b/packages/runtime-core/src/components/KeepAlive.ts @@ -31,7 +31,6 @@ import { invokeArrayFns } from '@vue/shared' import { watch } from '../apiWatch' -import { hmrDirtyComponents } from '../hmr' import { RendererInternals, queuePostRenderEffect, @@ -281,8 +280,7 @@ const KeepAliveImpl: ComponentOptions = { if ( (include && (!name || !matches(include, name))) || - (exclude && name && matches(exclude, name)) || - (__DEV__ && hmrDirtyComponents.has(comp)) + (exclude && name && matches(exclude, name)) ) { current = vnode return rawVNode