Rspack is a Webpack-compatible bundler written in Rust. Drop-in replacement — same config format, same plugin API, same loaders. Just 10x faster.
Quick Start
npm install -D @rspack/core @rspack/cli
// rspack.config.js — looks exactly like webpack.config.js
module.exports = {
entry: './src/index.js',
output: { filename: 'bundle.js' },
module: {
rules: [
{ test: /\.tsx?$/, use: 'builtin:swc-loader' },
{ test: /\.css$/, use: ['style-loader', 'css-loader'] }
]
}
}
Speed Comparison
| Bundler | Cold Build | HMR |
|---|---|---|
| Webpack | 30s | 1-5s |
| Rspack | 3s | <100ms |
| Vite | 2s (dev) | <50ms |
Webpack Compatibility
Most webpack plugins and loaders work with Rspack:
- css-loader, style-loader, postcss-loader
- html-webpack-plugin
- mini-css-extract-plugin
- Most custom loaders
Migration from Webpack
- Install Rspack
- Rename
webpack.config.jstorspack.config.js - Replace
webpackimports with@rspack/core - Run
rspack build
That's it for most projects.
Built-in Features (No Extra Plugins)
- TypeScript (via SWC)
- CSS Modules
- Asset modules
- Tree shaking
- Code splitting
The Bottom Line
If you have a large Webpack project and can't migrate to Vite, Rspack gives you 10x speed with minimal config changes.
Need to automate data collection or build custom scrapers? Check out my Apify actors for ready-made tools, or email spinov001@gmail.com for custom solutions.
Top comments (0)