refactor: move isRuntimeCompiled flag into component.ts
This commit is contained in:
parent
46c5393224
commit
2b178981bc
@ -371,6 +371,8 @@ function finishComponentSetup(
|
|||||||
Component.render = compile!(Component.template, {
|
Component.render = compile!(Component.template, {
|
||||||
isCustomElement: instance.appContext.config.isCustomElement || NO
|
isCustomElement: instance.appContext.config.isCustomElement || NO
|
||||||
})
|
})
|
||||||
|
// mark the function as runtime compiled
|
||||||
|
;(Component.render as RenderFunction).isRuntimeCompiled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
if (__DEV__ && !Component.render) {
|
if (__DEV__ && !Component.render) {
|
||||||
|
@ -54,7 +54,6 @@ function compileToFunction(
|
|||||||
})
|
})
|
||||||
|
|
||||||
const render = new Function('Vue', code)(runtimeDom) as RenderFunction
|
const render = new Function('Vue', code)(runtimeDom) as RenderFunction
|
||||||
render.isRuntimeCompiled = true
|
|
||||||
return (compileCache[key] = render)
|
return (compileCache[key] = render)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user