Skip to content

Commit

Permalink
fix: plugin conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Jul 16, 2023
1 parent 8090a87 commit c6e8a13
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/compiler-sfc/src/script/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ export function resolveParserPlugins(
userPlugins = userPlugins.filter(p => p !== 'jsx')
}
if (lang === 'ts' || lang === 'tsx') {
plugins.push(
['typescript', { dts }],
['importAttributes', { deprecatedAssertSyntax: true }]
)
plugins.push(['typescript', { dts }])
if (!plugins.includes('importAssertions')) {
plugins.push(['importAttributes', { deprecatedAssertSyntax: true }])
}
if (!plugins.includes('decorators')) {
plugins.push('decorators-legacy')
}
Expand Down

0 comments on commit c6e8a13

Please sign in to comment.