|
|
@@ -126,7 +126,12 @@ export function compileScript(
|
|
|
)
|
|
|
}
|
|
|
if (options.babelParserPlugins) plugins.push(...options.babelParserPlugins)
|
|
|
- if (isTS) plugins.push('typescript', 'decorators-legacy')
|
|
|
+ if (isTS) {
|
|
|
+ plugins.push('typescript')
|
|
|
+ if (!plugins.includes('decorators')) {
|
|
|
+ plugins.push('decorators-legacy')
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
if (!scriptSetup) {
|
|
|
if (!script) {
|