Latest Results
perf(es/preset-env): Reduce binary size with browserslist deflate (#12381)
**Description:**
Reduce the native binary size by upgrading `browserslist-rs` from 0.20.0
to 0.21.2 and explicitly enabling `deflate` for its bundled browser
data.
`@swc/core` `.node` release size on `aarch64-apple-darwin`:
| Configuration | Bytes | MiB |
| --- | ---: | ---: |
| browserslist-rs 0.20.0 | 26,662,128 | 25.43 |
| browserslist-rs 0.21.2 + deflate | 24,185,488 | 23.07 |
| Reduction | **2,476,640** | **2.36 (9.29%)** |
Both builds used `cargo build --release --locked -p binding_core_node`,
default features (`swc_v1`, `plugin`), the repository toolchain
(`nightly-2026-04-10`), and the unchanged release profile (fat LTO,
stripped symbols, one codegen unit, panic abort). The baseline is
`baf0ba6ee4`; both builds used the same checkout path. These are raw
native library sizes and measure the combined version upgrade and
deflate change.
Both `.node` libraries loaded through the `@swc/core` JavaScript API and
produced identical outputs for six browser-target queries, including
`supports`, regional usage, and baseline queries.
**BREAKING CHANGE:**
For Rust consumers, `BrowserData::parse_versions` now accepts
`browserslist::Distrib` from browserslist-rs 0.21 instead of 0.20, also
exposed through `swc_core::ecma::preset_env`. The changeset marks
`preset_env_base` and `swc_core` as major.
**Related issue (if exists):**
- [browserslist-rs v0.21.2 release
notes](https://github.com/browserslist/browserslist-rs/releases/tag/v0.21.2)
- [#50: Drop derivable caniuse
data](https://github.com/browserslist/browserslist-rs/pull/50)
- [#52: Compress data using
deflate](https://github.com/browserslist/browserslist-rs/pull/52)
- [#53: Deflate more
data](https://github.com/browserslist/browserslist-rs/pull/53)
- [#54: Improve deflate binary
size](https://github.com/browserslist/browserslist-rs/pull/54) Latest Branches
0%
fix/parser-asserts-linebreak 0%
chenjiahan:chenjiahan/browserslist-deflate 0%
fix/parser-mixed-tuple-elements © 2026 CodSpeed Technology