You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shakapacker 9.0 adds support for Rspack as an alternative to Webpack. Rspack is a high-performance JavaScript bundler written in Rust that is compatible with the Webpack ecosystem but significantly faster.
Benefits of Rspack
Blazing fast: 5-10x faster build times compared to Webpack
Written in Rust: Better performance and lower memory usage
Webpack compatible: Uses the same configuration API as Webpack
Background
Shakapacker 9.0 adds support for Rspack as an alternative to Webpack. Rspack is a high-performance JavaScript bundler written in Rust that is compatible with the Webpack ecosystem but significantly faster.
Benefits of Rspack
Migration Plan
1. Prerequisites
Note: This migration should be done AFTER migrating to SWC (issue #666), as Rspack works best with SWC.
2. Configuration Changes
shakapacker.ymlto setassets_bundler: rspack3. Configuration Updates
Update
config/shakapacker.yml:4. Plugin Compatibility Check
Review and update plugins in webpack config files:
MiniCssExtractPlugin- CompatibleCompressionWebpackPlugin- CompatibleHtmlWebpackPlugin- Compatible5. Loader Compatibility
Most loaders should work without changes:
sass-loader- Compatiblecss-loader- Compatiblepostcss-loader- Compatiblesass-resources-loader- Compatiblefile-loader/asset modules- Compatible6. Testing
yarn build:test7. Performance Benchmarking
Document build time improvements:
8. Documentation
Expected Performance Improvements
Based on Rspack benchmarks:
Potential Issues
Compatibility Notes
Rollback Plan
If issues arise:
assets_bundler: webpackinshakapacker.ymlReferences
Migration Sequence
This should be done in order:
Acceptance Criteria
cc: @justin808