diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index ef66f0d3fe6..3d86f0f2494 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -97,10 +97,15 @@ export function createHydrationFunctions( isFragmentStart ) - const { type, ref, shapeFlag } = vnode + const { type, ref, shapeFlag, patchFlag } = vnode const domType = node.nodeType vnode.el = node + if (patchFlag === PatchFlags.BAIL) { + optimized = false + vnode.dynamicChildren = null + } + let nextNode: Node | null = null switch (type) { case Text: diff --git a/packages/runtime-dom/src/apiCustomElement.ts b/packages/runtime-dom/src/apiCustomElement.ts index 059fcac16f1..eabe83b6b9f 100644 --- a/packages/runtime-dom/src/apiCustomElement.ts +++ b/packages/runtime-dom/src/apiCustomElement.ts @@ -122,13 +122,13 @@ export function defineCustomElement(options: { export function defineCustomElement( options: any, - hydate?: RootHydrateFunction + hydrate?: RootHydrateFunction ): VueElementConstructor { const Comp = defineComponent(options as any) class VueCustomElement extends VueElement { static def = Comp constructor(initialProps?: Record) { - super(Comp, initialProps, hydate) + super(Comp, initialProps, hydrate) } }