wip(compiler-ssr): text and interpolation

This commit is contained in:
Evan You
2020-02-02 22:28:54 -05:00
parent d1eed36452
commit 63e4486645
6 changed files with 87 additions and 36 deletions

View File

@@ -22,10 +22,13 @@ export function compile(
template: string,
options: SSRCompilerOptions = {}
): CodegenResult {
const ast = baseParse(template, {
// apply DOM-specific parsing options
options = {
...parserOptions,
...options
})
}
const ast = baseParse(template, options)
transform(ast, {
...options,
@@ -52,7 +55,7 @@ export function compile(
// traverse the template AST and convert into SSR codegen AST
// by replacing ast.codegenNode.
ssrCodegenTransform(ast)
ssrCodegenTransform(ast, options)
return generate(ast, {
mode: 'cjs',