feat(compiler): mark hoisted trees with patchFlag

This commit is contained in:
Evan You
2020-02-12 13:31:29 -05:00
parent d866d389f3
commit 175f8aae8d
6 changed files with 25 additions and 17 deletions

View File

@@ -52,6 +52,7 @@ function walk(
) {
if (!doNotHoistNode && isStaticNode(child, resultCache)) {
// whole tree is static
;(child.codegenNode as VNodeCall).patchFlag = PatchFlags.HOISTED + ``
const hoisted = context.transformHoist
? context.transformHoist(child, context)
: child.codegenNode!