fix(compiler-sfc): enable prefixIdentifiers by default when reparsing on consumed AST (#10105)

This commit is contained in:
三咲智子 Kevin Deng 2024-01-14 09:36:04 +08:00 committed by GitHub
parent 23f94869fd
commit 48bf8e4c70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -219,6 +219,7 @@ function doCompileTemplate({
// 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 = (ssr ? CompilerDOM : compiler).parse(inAST.source, {
prefixIdentifiers: true,
...compilerOptions,
parseMode: 'sfc',
onError: e => errors.push(e),