From 48bf8e4c708ec620e4852d71c8713394457108ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90=20Kevin=20Deng?= Date: Sun, 14 Jan 2024 09:36:04 +0800 Subject: [PATCH] fix(compiler-sfc): enable prefixIdentifiers by default when reparsing on consumed AST (#10105) --- packages/compiler-sfc/src/compileTemplate.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/compiler-sfc/src/compileTemplate.ts b/packages/compiler-sfc/src/compileTemplate.ts index 5b7fe268366..2d5ffdad7d8 100644 --- a/packages/compiler-sfc/src/compileTemplate.ts +++ b/packages/compiler-sfc/src/compileTemplate.ts @@ -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),