mirror of
https://github.com/vuejs/vue.git
synced 2024-11-21 20:28:54 +00:00
fix(sfc): only include legacy decorator parser plugin when new plugin is not used
This commit is contained in:
parent
0ea6c366f5
commit
326d24a4e4
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user