mirror of
https://github.com/danbulant/oxc
synced 2026-05-19 04:08:41 +00:00
feat(oxc): conditional expose oxc_cfg in oxc crate (#5524)
This is useful when the downside user wants to use `oxc_cfg`, and easy to reuse `petgraph` in `oxc_cfg`
This commit is contained in:
parent
1bed5ce2a5
commit
ed8ab6d7c8
3 changed files with 9 additions and 0 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
|
@ -1395,6 +1395,7 @@ version = "0.26.0"
|
|||
dependencies = [
|
||||
"oxc_allocator",
|
||||
"oxc_ast",
|
||||
"oxc_cfg",
|
||||
"oxc_codegen",
|
||||
"oxc_diagnostics",
|
||||
"oxc_index",
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
||||
|
|
|
|||
|
|
@ -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::*;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue