Skip to content

Commit

Permalink
fix(swc_core): Remove unused preset_env (#9333)
Browse files Browse the repository at this point in the history
**Description:**

While upgrading to 0.99.4, we encounter a compile error with the
`ecma_preset_env` feature on `swc_core`. Seems that the preset_env_base
package is not a dependency of
[swc_core](https://github.com/swc-project/swc/blob/95af17ff917a6ec3d1420f6bc089585f89a8cd31/crates/swc_core/Cargo.toml#L336-L387)

[Repro](https://github.com/LingyuCoder/swc-ecma-preset-env-error)
  • Loading branch information
LingyuCoder committed Jul 25, 2024
1 parent 57146cf commit 75bc7bf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/rare-brooms-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
swc_core: patch
---

fix: remove unused preset env usage
6 changes: 0 additions & 6 deletions crates/swc_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ pub extern crate swc_ecma_quote_macros;
)]
pub mod plugin;

#[cfg(feature = "ecma_preset_env")]
#[cfg_attr(docsrs, doc(cfg(feature = "preset_env")))]
pub mod preset_env {
pub use preset_env_base::*;
}

#[cfg(feature = "__ecma")]
#[cfg_attr(docsrs, doc(cfg(feature = "__ecma")))]
pub mod ecma {
Expand Down

0 comments on commit 75bc7bf

Please sign in to comment.