We frequently encounter projects where Webpack builds take minutes instead of seconds. Developers wait, and clients waste money. Rspack—a bundler from ByteDance (TikTok) written in Rust with a Webpack-compatible API—solves this. Based on our data, switching a typical React project with 2000+ components from Webpack to Rspack cuts dev builds from 45 to 8 seconds and production builds from 120 to 15 seconds. That directly reduces dev costs: less time building, more time for features. The core idea: take your existing Webpack config, replace require('webpack') with require('@rspack/core'), and get builds 5–10x faster without rewriting configurations. In practice, compatibility isn't 100%, but for most projects it's a viable path. Order a turnkey Rspack setup from us—we guarantee compatibility and rapid results.
Why Rspack instead of Vite?
Vite is an excellent choice for new projects. Rspack is needed when:
- You already have a large Webpack config that would be hard to rewrite for Vite
- You use specific Webpack plugins that have no Vite analogues
- You need Module Federation support (Rspack supports MF v1 and v2)
- Your project already uses Rsbuild or Rsdoctor from the ByteDance ecosystem
Vite uses the browser's native module system in dev mode but bundles with Rollup for production. Rspack uses a single Rust engine for both dev and build, simplifying configuration and accelerating production builds. If you're already using Rsbuild, migration to Rspack is even faster—just change the adapter.
How to migrate from Webpack to Rspack
A typical migration takes 4–8 hours. First, install the packages: npm install --save-dev @rspack/core @rspack/cli. Then replace scripts in package.json: "dev": "rspack dev" and "build": "rspack build". Next, rename webpack.config.js to rspack.config.js and replace the import: const { rspack } = require('@rspack/core') instead of const webpack = require('webpack'). Finally, adapt the built-in plugins: webpack.DefinePlugin → rspack.DefinePlugin, HtmlWebpackPlugin → rspack.HtmlRspackPlugin, MiniCssExtractPlugin → rspack.CssExtractRspackPlugin. If you use ProgressPlugin or BannerPlugin, their analogues are available in @rspack/core.
| Parameter | Webpack (v5) | Rspack |
|---|---|---|
| First dev build | 45 s | 8 s |
| Hot reload | 2 s | 0.5 s |
| Production build | 120 s | 15 s |
| Bundle size | 500 KB | 510 KB |
How to quickly set up Rspack for a React project?
A typical rspack.config.ts for a React project with TypeScript looks like this:
import { defineConfig } from '@rspack/cli'; import { rspack } from '@rspack/core'; import path from 'path'; export default defineConfig({ entry: { main: './src/index.tsx', }, output: { filename: '[name].[contenthash:8].js', path: path.resolve(__dirname, 'dist'), clean: true, }, resolve: { extensions: ['.tsx', '.ts', '.jsx', '.js'], alias: { '@': path.resolve(__dirname, 'src'), }, }, module: { rules: [ { test: /\.(tsx?|jsx?)$/, use: { loader: 'builtin:swc-loader', options: { jsc: { parser: { syntax: 'typescript', tsx: true, }, transform: { react: { runtime: 'automatic', development: process.env.NODE_ENV === 'development', refresh: process.env.NODE_ENV === 'development', }, }, }, env: { targets: 'Chrome >= 90', }, }, }, exclude: /node_modules/, }, { test: /\.css$/, use: [rspack.CssExtractRspackPlugin.loader, 'css-loader', 'postcss-loader'], }, { test: /\.(png|jpe?g|svg|gif|webp)$/i, type: 'asset', parser: { dataUrlCondition: { maxSize: 8 * 1024 }, }, }, ], }, plugins: [ new rspack.HtmlRspackPlugin({ template: './public/index.html', filename: 'index.html', }), new rspack.CssExtractRspackPlugin({ filename: '[name].[contenthash:8].css', }), new rspack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV), }), ], optimization: { splitChunks: { chunks: 'all', cacheGroups: { vendor: { test: /[\\/]node_modules[\\/]/, name: 'vendors', priority: 10, }, }, }, }, devServer: { port: 3000, historyApiFallback: true, hot: true, }, }); Module Federation with Rspack
Rspack supports Module Federation v2 via @module-federation/enhanced:
import { ModuleFederationPlugin } from '@module-federation/enhanced/rspack'; plugins: [ new ModuleFederationPlugin({ name: 'host_app', remotes: { remote_ui: 'remote_ui@http://localhost:3001/remoteEntry.js', }, shared: { react: { singleton: true, requiredVersion: '^18.0.0' }, 'react-dom': { singleton: true }, }, }), ] What is Rsbuild?
Rsbuild is a wrapper around Rspack with a ready-made configuration, similar to Vite. It provides plugins for React, Vue, SASS, etc. If you are starting a new project without a legacy Webpack config, Rsbuild is the best choice. Setting up a new React/TypeScript project takes 1–2 hours.
Plugin compatibility
Most Webpack plugins work with Rspack, but there are exceptions. Tested plugins are listed on the official Rspack website. Incompatible ones include some plugins that use low-level Webpack compilation hooks (compiler.hooks.thisCompilation, custom tapable hooks). You can check a specific plugin with:
rspack build 2>&1 | grep -i "unsupported\|warning\|deprecated" Typical migration mistakes
- Mismatched target and environment: Rspack defaults to building for Node.js if not specified with
target: 'web'. - Plugins working through compilation.hooks: e.g.,
webpack-manifest-pluginmay need adaptation. - Use of
require.context: Works in Rspack but with limitations. Better to replace withimport.meta.globfrom Rsbuild.
What's included in Rspack setup
- Full migration of configuration from Webpack to Rspack
- Adaptation of plugins and loaders
- Module Federation setup (if needed)
- Optimization of split chunks and caching
- Documentation of changes
- Team training on basic principles
- One month of support after setup
Timelines and cost
Timelines depend on project complexity. Switching from Webpack to Rspack without Module Federation takes 4–8 hours. Setting up Rsbuild from scratch takes 1–2 hours. Integrating Module Federation between multiple applications takes 1–2 days. Cost is calculated individually. Rspack setup pays for itself within 1–2 months through team time savings. Contact us for a project assessment and optimal solution. Order Rspack setup and speed up your development.
Our company has over 10 years of experience in web development and has implemented more than 40 projects using modern bundlers. We guarantee compatibility with your ecosystem and up to 10x build acceleration.







