1
1
import type { CallExpression , Node , ObjectPattern , Program } from '@babel/types'
2
2
import type { SFCDescriptor } from '../parse'
3
- import { generateCodeFrame , isArray } from '@vue/shared'
3
+ import { generateCodeFrame } from '@vue/shared'
4
4
import { type ParserPlugin , parse as babelParse } from '@babel/parser'
5
5
import type { ImportBinding , SFCScriptCompileOptions } from '../compileScript'
6
6
import type { PropsDestructureBindings } from './defineProps'
@@ -170,17 +170,6 @@ export function resolveParserPlugins(
170
170
dts = false ,
171
171
) : ParserPlugin [ ] {
172
172
const plugins : ParserPlugin [ ] = [ ]
173
- if (
174
- ! userPlugins ||
175
- ! userPlugins . some (
176
- p =>
177
- p === 'importAssertions' ||
178
- p === 'importAttributes' ||
179
- ( isArray ( p ) && p [ 0 ] === 'importAttributes' ) ,
180
- )
181
- ) {
182
- plugins . push ( 'importAttributes' )
183
- }
184
173
if ( lang === 'jsx' || lang === 'tsx' || lang === 'mtsx' ) {
185
174
plugins . push ( 'jsx' )
186
175
} else if ( userPlugins ) {
@@ -189,7 +178,7 @@ export function resolveParserPlugins(
189
178
userPlugins = userPlugins . filter ( p => p !== 'jsx' )
190
179
}
191
180
if ( lang === 'ts' || lang === 'mts' || lang === 'tsx' || lang === 'mtsx' ) {
192
- plugins . push ( [ 'typescript' , { dts } ] , 'explicitResourceManagement' )
181
+ plugins . push ( [ 'typescript' , { dts } ] )
193
182
if ( ! userPlugins || ! userPlugins . includes ( 'decorators' ) ) {
194
183
plugins . push ( 'decorators-legacy' )
195
184
}
0 commit comments