]> git.ipfire.org Git - thirdparty/vuejs/core.git/commitdiff
fix(parser): skip compat mode check for SFC root `<template>` tags (#10034)
authorHaoqun Jiang <haoqunjiang@gmail.com>
Tue, 9 Jan 2024 03:14:00 +0000 (11:14 +0800)
committerGitHub <noreply@github.com>
Tue, 9 Jan 2024 03:14:00 +0000 (11:14 +0800)
Fixes https://github.com/vitejs/vite-plugin-vue/issues/330

packages/compiler-core/src/parser.ts

index e73bffdeb3e8bb01dc8d4ae7a9fc026353d8a884..202fba81b1870e707d645fa186e4f375b369ef1c 100644 (file)
@@ -692,6 +692,7 @@ function onCloseTag(el: ElementNode, end: number, isImplied = false) {
     }
 
     if (
+      !tokenizer.inSFCRoot &&
       isCompatEnabled(
         CompilerDeprecationTypes.COMPILER_NATIVE_TEMPLATE,
         currentOptions,