test(compiler): transformIf

This commit is contained in:
Evan You
2019-09-19 15:41:17 -04:00
parent 81fd694dd7
commit 2b4f06b24c
5 changed files with 371 additions and 26 deletions

View File

@@ -186,6 +186,10 @@ function pushNode(
nodes: ChildNode[],
node: ChildNode
): void {
// ignore comments in production
if (!__DEV__ && node.type === NodeTypes.COMMENT) {
return
}
if (context.ignoreSpaces && node.type === NodeTypes.TEXT && node.isEmpty) {
return
}