fix(compiler-core): fix `resolveParserPlugins` decorators check (#9566)

close #9560
This commit is contained in:
丶远方 2023-11-09 14:32:08 +08:00 committed by GitHub
parent 2c0414fdca
commit 9d0eba916f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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')
}
}