feat(ssr/suspense): suspense hydration
In order to support hydration of async components, server-rendered fragments must be explicitly marked with comment nodes.
This commit is contained in:
@@ -30,7 +30,8 @@ import {
|
||||
traverseNode,
|
||||
ExpressionNode,
|
||||
TemplateNode,
|
||||
SUSPENSE
|
||||
SUSPENSE,
|
||||
TRANSITION_GROUP
|
||||
} from '@vue/compiler-dom'
|
||||
import { SSR_RENDER_COMPONENT } from '../runtimeHelpers'
|
||||
import {
|
||||
@@ -151,7 +152,7 @@ export function ssrProcessComponent(
|
||||
return ssrProcessSuspense(node, context)
|
||||
} else {
|
||||
// real fall-through (e.g. KeepAlive): just render its children.
|
||||
processChildren(node.children, context)
|
||||
processChildren(node.children, context, component === TRANSITION_GROUP)
|
||||
}
|
||||
} else {
|
||||
// finish up slot function expressions from the 1st pass.
|
||||
@@ -167,6 +168,7 @@ export function ssrProcessComponent(
|
||||
processChildrenAsStatement(
|
||||
children,
|
||||
context,
|
||||
false,
|
||||
true /* withSlotScopeId */
|
||||
),
|
||||
vnodeBranch
|
||||
|
||||
Reference in New Issue
Block a user