]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
chore: warn vapor hydration for now
authorEvan You <evan@vuejs.org>
Sat, 8 Feb 2025 07:06:27 +0000 (15:06 +0800)
committerEvan You <evan@vuejs.org>
Sat, 8 Feb 2025 07:06:27 +0000 (15:06 +0800)
packages/runtime-core/src/hydration.ts

index 652a84680d1367af7b198de54242d983afda5e77..ef6f1918c31998208cf0ac36a3013e9a62fd898b 100644 (file)
@@ -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.