Skip to content

Commit c6e8a13

Browse files
committed
fix: plugin conflict
1 parent 8090a87 commit c6e8a13

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/compiler-sfc/src/script/context.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,10 @@ export function resolveParserPlugins(
163163
userPlugins = userPlugins.filter(p => p !== 'jsx')
164164
}
165165
if (lang === 'ts' || lang === 'tsx') {
166-
plugins.push(
167-
['typescript', { dts }],
168-
['importAttributes', { deprecatedAssertSyntax: true }]
169-
)
166+
plugins.push(['typescript', { dts }])
167+
if (!plugins.includes('importAssertions')) {
168+
plugins.push(['importAttributes', { deprecatedAssertSyntax: true }])
169+
}
170170
if (!plugins.includes('decorators')) {
171171
plugins.push('decorators-legacy')
172172
}

0 commit comments

Comments
 (0)