Selaa lähdekoodia

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

close #9560
丶远方 2 vuotta sitten
vanhempi
commit
9d0eba916f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      packages/compiler-sfc/src/script/context.ts

+ 1 - 1
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')
     }
   }