While Rspack is aimed at maximizing compatibility with Webpack API contracts, some minor changes are necessary to accommodate differences in implementation, as well as enabling optimizations by replacing some plugins/loaders with Rspack's built-in equivalents.
You can refer to "Webpack configuration compatibility" for configuration migration.
Rspack already has built-in support for TypeScript and JSX as well as the latest ECMAScript syntaxes. If your configuration only uses babel-loader
to support TypeScript, JSX, and modern ECMAScript, then you can remove babel-loader
entirely.
Alternatively, if your configuration relies on babel-loader
for custom conversion logic, it should be kept. However, we recommend to avoid babel-loader
if possible because it can cause significant performance degradation for large projects.
Rspack's native CSS Module type has built-in support for CSS, CSS HMR, CSS Modules, and CSS extraction. This eliminates the need for css-loader
, style-loader
, and mini-css-extract-plugin
for handling CSS files:
Rspack's css-modules functionality is enabled by specifying `css/module`` as the module type:
Rspack is aligned with Webpack 5's "asset modules," which should be used instead of file-loader
and url-loader
.