diff --git a/Cargo.lock b/Cargo.lock index 1d00237a0..9cd908373 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1280,6 +1280,7 @@ dependencies = [ "oxc_diagnostics", "oxc_index", "oxc_isolated_declarations", + "oxc_mangler", "oxc_minifier", "oxc_parser", "oxc_semantic", diff --git a/crates/oxc/Cargo.toml b/crates/oxc/Cargo.toml index b4fda3715..48f1c4a12 100644 --- a/crates/oxc/Cargo.toml +++ b/crates/oxc/Cargo.toml @@ -31,6 +31,7 @@ oxc_syntax = { workspace = true } oxc_semantic = { workspace = true, optional = true } oxc_transformer = { workspace = true, optional = true } oxc_minifier = { workspace = true, optional = true } +oxc_mangler = { workspace = true, optional = true } oxc_codegen = { workspace = true, optional = true } oxc_sourcemap = { workspace = true, optional = true } oxc_isolated_declarations = { workspace = true, optional = true } @@ -39,7 +40,7 @@ oxc_isolated_declarations = { workspace = true, optional = true } serialize = ["oxc_ast/serialize", "oxc_semantic?/serialize", "oxc_span/serialize", "oxc_syntax/serialize"] semantic = ["oxc_semantic"] transformer = ["oxc_transformer"] -minifier = ["oxc_minifier"] +minifier = ["oxc_mangler", "oxc_minifier"] codegen = ["oxc_codegen"] isolated_declarations = ["oxc_isolated_declarations"] diff --git a/crates/oxc/src/lib.rs b/crates/oxc/src/lib.rs index 7b1954634..cdddabb9c 100644 --- a/crates/oxc/src/lib.rs +++ b/crates/oxc/src/lib.rs @@ -55,6 +55,12 @@ pub mod minifier { pub use oxc_minifier::*; } +#[cfg(feature = "minifier")] +pub mod mangler { + #[doc(inline)] + pub use oxc_mangler::*; +} + #[cfg(feature = "codegen")] pub mod codegen { #[doc(inline)]