feat(ssr): renderToStream (#1197)

This commit is contained in:
Stanislav Lashmanov
2020-06-26 18:09:47 +03:00
committed by GitHub
parent e0d19a6953
commit 6bc0e0a31a
13 changed files with 1054 additions and 389 deletions

View File

@@ -0,0 +1,15 @@
import { Component, ComponentInternalInstance, createVNode, Slots } from 'vue'
import { Props, renderComponentVNode, SSRBuffer } from '../render'
import { SSRSlots } from './ssrRenderSlot'
export function ssrRenderComponent(
comp: Component,
props: Props | null = null,
children: Slots | SSRSlots | null = null,
parentComponent: ComponentInternalInstance | null = null
): SSRBuffer | Promise<SSRBuffer> {
return renderComponentVNode(
createVNode(comp, props, children),
parentComponent
)
}