refactor(compiler-core): hoist static text calls between elements

This commit is contained in:
Evan You
2020-02-10 18:32:11 -05:00
parent 12fcf9ab95
commit f4c54a888b
5 changed files with 42 additions and 38 deletions

View File

@@ -41,7 +41,7 @@ export function compile(
template: string,
options: CompilerOptions = {}
): CodegenResult {
return baseCompile(template, {
const result = baseCompile(template, {
...parserOptions,
...options,
nodeTransforms: [...DOMNodeTransforms, ...(options.nodeTransforms || [])],
@@ -50,6 +50,8 @@ export function compile(
...(options.directiveTransforms || {})
}
})
// debugger
return result
}
export function parse(template: string, options: ParserOptions = {}): RootNode {