fix(compiler-sfc): only add decorators-legacy parser plugin when new decorators plugin is not used
This commit is contained in:
parent
8edf4b3441
commit
3ff83694f5
@ -185,7 +185,12 @@ export function compileScript(
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (options.babelParserPlugins) plugins.push(...options.babelParserPlugins)
|
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 (!scriptSetup) {
|
||||||
if (!script) {
|
if (!script) {
|
||||||
|
Loading…
Reference in New Issue
Block a user