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

@@ -13,6 +13,7 @@ import { transformOn } from './transforms/vOn'
import { transformBind } from './transforms/vBind'
import { defaultOnError, createCompilerError, ErrorCodes } from './errors'
import { trackSlotScopes } from './transforms/vSlot'
import { optimizeText } from './transforms/optimizeText'
export type CompilerOptions = ParserOptions & TransformOptions & CodegenOptions
@@ -45,6 +46,7 @@ export function baseCompile(
transformIf,
transformFor,
...(prefixIdentifiers ? [transformExpression, trackSlotScopes] : []),
optimizeText,
transformStyle,
transformSlotOutlet,
transformElement,