refactor(codegen): only generate pre data for possible components

This commit is contained in:
Evan You 2018-10-24 13:52:35 -04:00
parent 0b16927c9d
commit 002acbe678
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ export function genElement (el: ASTElement, state: CodegenState): string {
code = genComponent(el.component, el, state)
} else {
let data
if (!el.plain || el.pre) {
if (!el.plain || (el.pre && state.maybeComponent(el))) {
data = genData(el, state)
}