fix(parser): skip compat mode check for SFC root `<template>` tags (#10034)

Fixes https://github.com/vitejs/vite-plugin-vue/issues/330
This commit is contained in:
Haoqun Jiang 2024-01-09 11:14:00 +08:00 committed by GitHub
parent 7976f7044e
commit 923d560d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

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