@@ -678,7 +678,7 @@ export function handleSetupResult(
678678) {
679679 if ( isFunction ( setupResult ) ) {
680680 // setup returned an inline render function
681- if ( __NODE_JS__ && ( instance . type as ComponentOptions ) . __ssrInlineRender ) {
681+ if ( __SSR__ && ( instance . type as ComponentOptions ) . __ssrInlineRender ) {
682682 // when the function's name is `ssrRender` (compiled by SFC inline mode),
683683 // set it as ssrRender instead.
684684 instance . ssrRender = setupResult
@@ -751,18 +751,11 @@ export function finishComponentSetup(
751751 }
752752
753753 // template / render function normalization
754- if ( __NODE_JS__ && isSSR ) {
755- // 1. the render function may already exist, returned by `setup`
756- // 2. otherwise try to use the `Component.render`
757- // 3. if the component doesn't have a render function,
758- // set `instance.render` to NOOP so that it can inherit the render
759- // function from mixins/extend
760- instance . render = ( instance . render ||
761- Component . render ||
762- NOOP ) as InternalRenderFunction
763- } else if ( ! instance . render ) {
764- // could be set from setup()
765- if ( compile && ! Component . render ) {
754+ // could be already set when returned from setup()
755+ if ( ! instance . render ) {
756+ // only do on-the-fly compile if not in SSR - SSR on-the-fly compliation
757+ // is done by server-renderer
758+ if ( ! isSSR && compile && ! Component . render ) {
766759 const template =
767760 ( __COMPAT__ &&
768761 instance . vnode . props &&
0 commit comments