diff --git a/packages/runtime-core/src/component.ts b/packages/runtime-core/src/component.ts index d81155b3..4825d873 100644 --- a/packages/runtime-core/src/component.ts +++ b/packages/runtime-core/src/component.ts @@ -371,6 +371,8 @@ function finishComponentSetup( Component.render = compile!(Component.template, { isCustomElement: instance.appContext.config.isCustomElement || NO }) + // mark the function as runtime compiled + ;(Component.render as RenderFunction).isRuntimeCompiled = true } if (__DEV__ && !Component.render) { diff --git a/packages/vue/src/index.ts b/packages/vue/src/index.ts index 2d45378f..aea2b61e 100644 --- a/packages/vue/src/index.ts +++ b/packages/vue/src/index.ts @@ -54,7 +54,6 @@ function compileToFunction( }) const render = new Function('Vue', code)(runtimeDom) as RenderFunction - render.isRuntimeCompiled = true return (compileCache[key] = render) }