From ce933390ad1c72bed258f7ad959a78f0e8acdf57 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=B1=B1=E5=90=B9=E8=89=B2=E5=BE=A1=E5=AE=88?= <85992002+KazariEX@users.noreply.github.com> Date: Fri, 18 Jul 2025 00:58:50 -0700 Subject: [PATCH] fix(compiler-core): recognize empty string as non-identifier (#12553) --- packages/compiler-core/src/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-core/src/utils.ts b/packages/compiler-core/src/utils.ts index b49d70bb2f..113096cef2 100644 --- a/packages/compiler-core/src/utils.ts +++ b/packages/compiler-core/src/utils.ts @@ -63,7 +63,7 @@ export function isCoreComponent(tag: string): symbol | void { } } -const nonIdentifierRE = /^\d|[^\$\w\xA0-\uFFFF]/ +const nonIdentifierRE = /^$|^\d|[^\$\w\xA0-\uFFFF]/ export const isSimpleIdentifier = (name: string): boolean => !nonIdentifierRE.test(name) -- 2.47.2