refactor(compiler): flush transform onExit in reverse

This commit is contained in:
Evan You
2019-10-08 16:53:26 -04:00
parent e8ee163fdd
commit 0615cf0108
4 changed files with 5 additions and 4 deletions

View File

@@ -33,7 +33,7 @@ function parseWithElementTransform(
// block as root node
const ast = parse(`<div>${template}</div>`, options)
transform(ast, {
nodeTransforms: [optimizeText, transformElement],
nodeTransforms: [transformElement, optimizeText],
...options
})
const codegenNode = (ast as any).children[0].children[0]