The build passed. The import failed at runtime.
Rspack v2.1.0 production builds could remove the real default export from a Babel-compiled CommonJS package. The affected import worked in the release candidate, and v2.1.1 restored the behavior about 18 hours later.
The anatomy of a regression
- 01 Project
- 02 Regression & fix
- 03 Early replay
A fast Rust-based bundler for the web.
Rspack is an open-source Rust bundler with a modernized webpack-compatible API. Its production optimizer shapes the JavaScript that downstream applications execute.
Project repositoryValid default imports became undefined.
A new side-effect analysis treated a CommonJS export assignment inside an unused variable declaration as removable. Production optimization then discarded the declaration and the export write with it. Rspack v2.1.1 reverted the change.
Babel-compiled CommonJS package → Rspack optimizer → production bundle → default import- Compared
- v2.1.0-rc.0 → v2.1.0
- Affected
- v2.1.0–v2.1.0 · 1 release
- Public report
- User · 12 minutes after release
- Fixed
- v2.1.1 · ~18 hours later

Early found the regression.
“CJS export-assign now DCE-prunable via declarator”
Early traced the production-only failure to the changed side-effect analysis and the export write it made removable. The independent reproduction passed on v2.1.0-rc.0, failed on v2.1.0, and passed again on v2.1.1.
Follow the record.
Independent replay. Not affiliated with Rspack.
Explore more Case Files