fix(compiler-sfc): use correct compiler when re-parsing in ssr mode
This commit is contained in:
parent
2e65ea481f
commit
678378afd5
|
@ -218,7 +218,7 @@ function doCompileTemplate({
|
|||
// input AST has codegenNode - it has already been transformed and cannot
|
||||
// be reused. We need to parse a fresh one. Can't just use `source` here
|
||||
// since we need the AST location info to be relative to the entire SFC.
|
||||
const newAST = compiler.parse(inAST.source, {
|
||||
const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, {
|
||||
parseMode: 'sfc',
|
||||
onError: e => errors.push(e)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue