Skip to content

Commit 8498fcb

Browse files
committed
fix(compiler-sfc): use compilerOptions when re-parsing consumed AST
fixes hydration error for custom elements
1 parent be7eabd commit 8498fcb

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/compiler-sfc/src/compileTemplate.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ function doCompileTemplate({
219219
// We need to parse a fresh one. Can't just use `source` here since we need
220220
// the AST location info to be relative to the entire SFC.
221221
const newAST = (ssr ? CompilerDOM : compiler).parse(inAST.source, {
222+
...compilerOptions,
222223
parseMode: 'sfc',
223224
onError: e => errors.push(e),
224225
})

0 commit comments

Comments
 (0)