feat(compiler): optimize text by merging adjacent nodes

This commit is contained in:
Evan You
2019-09-30 14:51:55 -04:00
parent 7ee07447c5
commit e5e40e1e38
11 changed files with 233 additions and 44 deletions

View File

@@ -29,7 +29,7 @@ export const transformIf = createStructuralDirectiveTransform(
})
} else {
// locate the adjacent v-if
const siblings = context.parent.children
const siblings = context.parent!.children
const comments = []
let i = siblings.indexOf(node as any)
while (i-- >= -1) {