From: Evan You Date: Sat, 8 Feb 2025 07:06:27 +0000 (+0800) Subject: chore: warn vapor hydration for now X-Git-Tag: v3.6.0-alpha.1~16^2~85 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a0cfc03b8b050bda1c5c5e7c7a860119e04b76c;p=thirdparty%2Fvuejs%2Fcore.git chore: warn vapor hydration for now --- diff --git a/packages/runtime-core/src/hydration.ts b/packages/runtime-core/src/hydration.ts index 652a84680d..ef6f1918c3 100644 --- a/packages/runtime-core/src/hydration.ts +++ b/packages/runtime-core/src/hydration.ts @@ -11,7 +11,11 @@ import { normalizeVNode, } from './vnode' import { flushPostFlushCbs } from './scheduler' -import type { ComponentInternalInstance, ComponentOptions } from './component' +import type { + ComponentInternalInstance, + ComponentOptions, + ConcreteComponent, +} from './component' import { invokeDirectiveHook } from './directives' import { warn } from './warning' import { @@ -274,6 +278,10 @@ export function createHydrationFunctions( ) } } else if (shapeFlag & ShapeFlags.COMPONENT) { + if ((vnode.type as ConcreteComponent).__vapor) { + throw new Error('Vapor component hydration is not supported yet.') + } + // when setting up the render effect, if the initial vnode already // has .el set, the component will perform hydration instead of mount // on its sub-tree.