Преглед изворни кода

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

三咲智子 Kevin Deng пре 2 година
родитељ
комит
48bf8e4c70
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      packages/compiler-sfc/src/compileTemplate.ts

+ 1 - 0
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),