Skip to content
Permalink
Browse files
fix(compiler-sfc): only add decorators-legacy parser plugin when new …
…decorators plugin is not used
  • Loading branch information
yyx990803 committed Jun 30, 2022
1 parent 8edf4b3 commit 3ff83694f523e3fe148d22a469ed742b46603bb4
Showing 1 changed file with 6 additions and 1 deletion.
@@ -185,7 +185,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) {

0 comments on commit 3ff8369

Please sign in to comment.