Rspack is a high-performance JavaScript bundler written in Rust. Webpack-compatible but 5-10x faster.
What You Get for Free
- Webpack compatible — existing loaders and plugins
- 5-10x faster — Rust compilation
- HMR — fast hot module replacement
- Tree shaking — dead code elimination
- Code splitting — dynamic imports
- CSS built-in — no extra loaders
Config (same as webpack)
module.exports = {
entry: './src/index.js',
output: { filename: 'bundle.js' },
module: {
rules: [
{ test: /\.css$/, type: 'css' },
{ test: /\.tsx?$/, use: 'builtin:swc-loader' },
],
},
};
Rspack vs Vite vs Webpack
| Feature | Rspack | Vite | Webpack |
|---|---|---|---|
| Speed | 5-10x | Fast | Baseline |
| Compat | Webpack API | Rollup | Webpack |
Need build tooling? Check my work on GitHub or email spinov001@gmail.com for consulting.
Top comments (0)