Why Rspack?
Rspack is a Webpack-compatible bundler written in Rust. Drop it into existing Webpack projects for 5-10x faster builds — same config, same plugins, same loaders.
npm install @rspack/cli @rspack/core
rspack.config.js (Webpack-Compatible)
module.exports = {
entry: './src/index.js',
output: { filename: 'bundle.js', path: __dirname + '/dist' },
module: {
rules: [
{ test: /\.tsx?$/, use: 'builtin:swc-loader',
options: { jsc: { parser: { syntax: 'typescript', tsx: true } } } },
{ test: /\.css$/, type: 'css' },
],
},
plugins: [new (require('@rspack/core').HtmlRspackPlugin)()],
}
Migration from Webpack
- Replace
webpackwith@rspack/corein imports - Replace
webpack-cliwith@rspack/cli - Rename
webpack.config.jstorspack.config.js - Most loaders/plugins work unchanged
Speed Comparison
| Project | Webpack | Rspack |
|---|---|---|
| Dev start | 12s | 1.2s |
| HMR | 500ms | 50ms |
| Production | 45s | 5s |
Rspack vs Vite vs Webpack
| Feature | Rspack | Vite | Webpack |
|---|---|---|---|
| Speed | 10x Webpack | Very fast | Baseline |
| Compat | Webpack API | Rollup API | Native |
| Migration | Drop-in | Rewrite | N/A |
| Ecosystem | Webpack plugins | Vite plugins | Massive |
Need to extract data from any website at scale? I build custom web scrapers — 77 production scrapers running on Apify Store. Email me at spinov001@gmail.com for a tailored solution.
Top comments (0)