diff --git a/packages/compiler-sfc/src/script/context.ts b/packages/compiler-sfc/src/script/context.ts index 2a540e9581f..74d762f270e 100644 --- a/packages/compiler-sfc/src/script/context.ts +++ b/packages/compiler-sfc/src/script/context.ts @@ -163,7 +163,7 @@ export function resolveParserPlugins( userPlugins = userPlugins.filter(p => p !== 'jsx') } if (lang === 'ts' || lang === 'tsx') { - plugins.push(['typescript', { dts }]) + plugins.push(['typescript', { dts }], 'explicitResourceManagement') if (!plugins.includes('importAssertions')) { plugins.push(['importAttributes', { deprecatedAssertSyntax: true }]) }