@@ -678,7 +678,7 @@ export function handleSetupResult(
678
678
) {
679
679
if ( isFunction ( setupResult ) ) {
680
680
// setup returned an inline render function
681
- if ( __NODE_JS__ && ( instance . type as ComponentOptions ) . __ssrInlineRender ) {
681
+ if ( __SSR__ && ( instance . type as ComponentOptions ) . __ssrInlineRender ) {
682
682
// when the function's name is `ssrRender` (compiled by SFC inline mode),
683
683
// set it as ssrRender instead.
684
684
instance . ssrRender = setupResult
@@ -751,18 +751,11 @@ export function finishComponentSetup(
751
751
}
752
752
753
753
// 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 ) {
766
759
const template =
767
760
( __COMPAT__ &&
768
761
instance . vnode . props &&
0 commit comments