@@ -203,45 +203,6 @@ export async function transformWithOxc(
203
203
resolvedOptions . typescript ??= { }
204
204
resolvedOptions . typescript . removeClassFieldsWithoutInitializer =
205
205
! useDefineForClassFields
206
-
207
- // set target to es2021 or lower to enable class property transforms
208
- // https://github.com/oxc-project/oxc/issues/6735#issuecomment-2513866362
209
- if ( ! useDefineForClassFields ) {
210
- let set = false
211
- if ( ! resolvedOptions . target ) {
212
- resolvedOptions . target = 'es2021'
213
- set = true
214
- } else {
215
- const target = Array . isArray ( resolvedOptions . target )
216
- ? [ ...resolvedOptions . target ]
217
- : resolvedOptions . target . split ( ',' )
218
- const esTargetIndex = target . findIndex ( ( t ) =>
219
- t . toLowerCase ( ) . startsWith ( 'es' ) ,
220
- )
221
- if ( esTargetIndex >= 0 ) {
222
- const esTargetTrimmed = target [ esTargetIndex ] . toLowerCase ( ) . slice ( 2 )
223
- if (
224
- esTargetTrimmed === 'next' ||
225
- parseInt ( esTargetTrimmed , 10 ) > 2021
226
- ) {
227
- target [ esTargetIndex ] = 'es2021'
228
- set = true
229
- }
230
- } else {
231
- target . push ( 'es2021' )
232
- set = true
233
- }
234
- resolvedOptions . target = target
235
- }
236
-
237
- if ( set ) {
238
- warnings . push (
239
- 'target was modified to include ES2021' +
240
- ' because useDefineForClassFields is set to false' +
241
- ' and oxc does not support transforming useDefineForClassFields=false for ES2022+ yet' ,
242
- )
243
- }
244
- }
245
206
} catch ( e ) {
246
207
if ( e instanceof TSConfckParseError ) {
247
208
// tsconfig could be out of root, make sure it is watched on dev
0 commit comments