From 9d0eba916f3bf6fb5c03222400edae1a2db7444f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=B6=E8=BF=9C=E6=96=B9?= Date: Thu, 9 Nov 2023 14:32:08 +0800 Subject: [PATCH] fix(compiler-core): fix `resolveParserPlugins` decorators check (#9566) close #9560 --- packages/compiler-sfc/src/script/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-sfc/src/script/context.ts b/packages/compiler-sfc/src/script/context.ts index 692eab3ab9e..b05b8d910ee 100644 --- a/packages/compiler-sfc/src/script/context.ts +++ b/packages/compiler-sfc/src/script/context.ts @@ -164,7 +164,7 @@ export function resolveParserPlugins( } if (lang === 'ts' || lang === 'tsx') { plugins.push(['typescript', { dts }]) - if (!plugins.includes('decorators')) { + if (!userPlugins || !userPlugins.includes('decorators')) { plugins.push('decorators-legacy') } }