Skip to content

Commit

Permalink
chore(transformer): enable class-properties plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dunqing committed Dec 13, 2024
1 parent 65b109a commit 15c0218
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 2 additions & 8 deletions crates/oxc_transformer/src/options/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,7 @@ impl EnvOptions {
es2021: ES2021Options { logical_assignment_operators: true },
es2022: ES2022Options {
class_static_block: true,
class_properties: if include_unfinished_plugins {
Some(ClassPropertiesOptions::default())
} else {
None
},
class_properties: Some(ClassPropertiesOptions::default()),
},
}
}
Expand Down Expand Up @@ -139,9 +135,7 @@ impl EnvOptions {
}
}
engine_targets.insert(Engine::Es, es_target.unwrap_or(ESTarget::default()).version());
let mut env_options = EnvOptions::from(engine_targets);
env_options.es2022.class_properties = None;
Ok(env_options)
Ok(EnvOptions::from(engine_targets))
}
}

Expand Down
3 changes: 1 addition & 2 deletions crates/oxc_transformer/src/options/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ impl From<ESTarget> for TransformOptions {
fn from(target: ESTarget) -> Self {
let mut engine_targets = EngineTargets::default();
engine_targets.insert(Engine::Es, target.version());
let mut env = EnvOptions::from(engine_targets);
env.es2022.class_properties = None;
let env = EnvOptions::from(engine_targets);
Self { env, ..Self::default() }
}
}
Expand Down

0 comments on commit 15c0218

Please sign in to comment.