diff --git a/Cargo.lock b/Cargo.lock index 316fa82cc3cb5..f4b170790bb07 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1395,6 +1395,7 @@ version = "0.26.0" dependencies = [ "oxc_allocator", "oxc_ast", + "oxc_cfg", "oxc_codegen", "oxc_diagnostics", "oxc_index", diff --git a/crates/oxc/Cargo.toml b/crates/oxc/Cargo.toml index 64d8765f16115..cb38d9945c9bc 100644 --- a/crates/oxc/Cargo.toml +++ b/crates/oxc/Cargo.toml @@ -40,6 +40,7 @@ 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 } +oxc_cfg = { workspace = true, optional = true } [features] full = ["codegen", "mangler", "minifier", "semantic", "transformer"] @@ -49,6 +50,7 @@ transformer = ["oxc_transformer"] minifier = ["oxc_mangler", "oxc_minifier"] codegen = ["oxc_codegen"] mangler = ["oxc_mangler"] +cfg = ["oxc_cfg"] serialize = ["oxc_ast/serialize", "oxc_semantic?/serialize", "oxc_span/serialize", "oxc_syntax/serialize"] diff --git a/crates/oxc/src/lib.rs b/crates/oxc/src/lib.rs index 0cc28b899758f..7683c39ae84ea 100644 --- a/crates/oxc/src/lib.rs +++ b/crates/oxc/src/lib.rs @@ -84,3 +84,9 @@ pub mod sourcemap { #[doc(inline)] pub use oxc_sourcemap::*; } + +#[cfg(feature = "cfg")] +pub mod cfg { + #[doc(inline)] + pub use oxc_cfg::*; +}