Rspack Releases Version 1.7: Final 1.x Update Before 2.0 Transition
Rspack, a Rust-based web bundler designed as a high-performance alternative to Webpack, has released version 1.7, marking the final minor release in the 1.x series before the project transitions to version 2.0. This release focuses on stabilizing existing features and improving plugin compatibility.
Key Improvements in Rspack 1.7:
- Enhanced SWC Plugin Compatibility: Addresses the issue of high upgrade costs due to evolving AST structures, ensuring existing plugins remain functional after SWC upgrades.
- Native Support for Importing Assets as Bytes: Developers can now import assets as Uint8Array and decode them with TextDecoder, enhancing flexibility and performance.
- Stabilization of Experimental Features: Constant inlining optimization, TypeScript enum inlining, and type re-export checks are now stable and enabled by default.
- Lazy Compilation by Default: Dynamically imported modules in web applications now benefit from lazy compilation, reducing initial build times.
SWC Plugin Compatibility Enhancements:
Rspack's team contributed compatibility improvements to the SWC community, including adopting the CBOR serialization scheme and introducing an Unknown variant for enum types in the AST, ensuring SWC upgrades don't break existing plugins.
Lazy Compilation Feature:
Rspack's CLI now enables lazy compilation by default for dynamically imported modules in web applications, speeding up dev server startup. Developers can disable this feature if needed.
Experimental Features Stabilization:
Several experimental features have been stabilized, including constant inlining optimization, TypeScript enum inlining, and type re-export checks, with their respective experimental flags deprecated.
Migration Considerations:
Projects using SWC Wasm plugins must upgrade to compatible versions to avoid build failures. The Rspack team provides guidance on handling SWC plugin version mismatches.
Performance Comparison:
Rspack offers significantly faster build times compared to Webpack, as evidenced by user experiences. Migrating to Rspack can result in substantial build time reductions, as documented by users.
Ecosystem Updates:
The broader Rstack ecosystem also receives updates, with Rsbuild, Rsdoctor, and Rslib introducing new features and improvements.
About Rspack:
Rspack is an open-source project developed by ByteDance, aiming to provide Webpack-level API compatibility with Rust-powered performance improvements, making it suitable for teams seeking faster builds without leaving the Webpack ecosystem.