Function
pipeToNodeWritable
(
input: App | VNode,
context: SSRContext | undefined = {},
writable: Writable,
)
Source from the content-addressed store, hash-verified
| 124 | } |
| 125 | |
| 126 | export function pipeToNodeWritable( |
| 127 | input: App | VNode, |
| 128 | context: SSRContext | undefined = {}, |
| 129 | writable: Writable, |
| 130 | ): void { |
| 131 | renderToSimpleStream(input, context, { |
| 132 | push(content) { |
| 133 | if (content != null) { |
| 134 | writable.write(content) |
| 135 | } else { |
| 136 | writable.end() |
| 137 | } |
| 138 | }, |
| 139 | destroy(err) { |
| 140 | writable.destroy(err) |
| 141 | }, |
| 142 | }) |
| 143 | } |
| 144 | |
| 145 | export function renderToWebStream( |
| 146 | input: App | VNode, |