feat(server-renderer): decouple esm build from Node + improve stream API
- deprecate `renderToSTream` - added `renderToNodeStream` - added `renderToWebStream` - added `renderToSimpleStream` close #3467 close #3111 close #3460
This commit is contained in:
@@ -16,6 +16,14 @@ export function ssrCompile(
|
||||
template: string,
|
||||
instance: ComponentInternalInstance
|
||||
): SSRRenderFunction {
|
||||
if (!__NODE_JS__) {
|
||||
throw new Error(
|
||||
`On-the-fly template compilation is not supported in the ESM build of ` +
|
||||
`@vue/server-renderer. All templates must be pre-compiled into ` +
|
||||
`render functions.`
|
||||
)
|
||||
}
|
||||
|
||||
const cached = compileCache[template]
|
||||
if (cached) {
|
||||
return cached
|
||||
|
||||
Reference in New Issue
Block a user