Skip to content

Commit

Permalink
fix: plugin conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed Sep 21, 2023
1 parent 8116b33 commit ed552b2
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 ed552b2

Please sign in to comment.