Migrating from Rspack 0.x
The document lists all breaking changes from Rspack v0.7 to v1.0. You can refer to this document for migration.
See Breaking changes in Rspack v1.0.0 for details.
Configuration default value adjustments
In Rspack 1.x, we have aligned the default configuration values with those of Webpack.
[Important] experiments.css
The default value of experiments.css has been changed from true to false.
In Rspack 0.x, experiments.css was enabled by default, which means files ending with*.csswere automatically treated astype: 'css/auto' without needing to manually include other loaders to process CSS files.
If you rely on the built-in feature to handle CSS files without using any loaders, or if you have used the following configuration to handle CSS files:
Please note that you now need to manually enable experiments.css.
[Important] optimization.concatenateModules
The default value of optimization.concatenateModules has been changed from false to:
truewhenmodeis'production'.falsefor other values ofmode.
In Rspack 1.x, module concatenation optimization has become more stable. Thus, it's now enabled by default in production mode, allowing multiple modules to be concatenated into a single module to reduce output size and improve compression efficiency.
devtool
The default value of devtool has been changed from false to:
evalwhenmodeis'development'.falsefor other values ofmode.
@rspack/clioverrides the defaultdevtoolvalue from@rspack/core. Therefore, if you are using@rspack/cli, this change will not affect you.
experiments.asyncWebAssembly
The default value of experiments.asyncWebAssembly has been changed from false to depend on the experiments.futureDefaults configuration. It is enabled by default only when experiments.futureDefaults is set to true.
If you are using WebAssembly modules as asynchronous modules, you now need to manually set experiments.asyncWebAssembly to true.
splitChunks.cacheGroups.{cacheGroup}.reuseExistingChunk
The default value of splitChunks.cacheGroups.{cacheGroup}.reuseExistingChunk has been changed from true to false.
optimization.moduleIds
The default value of optimization.moduleIds has been changed to 'natural' when mode is none.
optimization.chunkIds
The default value of optimization.chunkIds has been changed to 'natural' when mode is none.
Removed configurations
[Important] Removed resolve.tsConfigPath
Please use resolve.tsConfig instead.
output.amdContainer
Please use output.library.amdContainer instead.
Adjustments to builtin:swc-loader
To streamline the core, Rspack 1.x has removed the built-in SWC plugins. You now need to manually include them.
[Important] Removed rspackExperiments.styledComponents
Use @swc/plugin-styled-components instead.
[Important] Removed rspackExperiments.emotion
Use @swc/plugin-emotion instead.
[Important] Removed rspackExperiments.relay
Use @swc/plugin-relay instead.
[Important] Removed rspackExperiments.preact
Use @swc/plugin-prefresh instead.
Adjustments to built-in plugins
[Important] CSS minimizer plugin adjustment
In Rspack 0.x, we used the built-in rspack.SwcCssMinimizerRspackPlugin to compress CSS size.
Now, we have removed it and replaced it with rspack.LightningCssMinimizerRspackPlugin to handle the same functionality.
If you previously manually registered and configured rspack.SwcCssMinimizerRspackPlugin, you should to switch to rspack.LightningCssMinimizerRspackPlugin:
rspack.SwcJsMinimizerRspackPlugin
Rspack's built-in and default-enabled JavaScript minimizer plugin has had its configuration aligned with SWC's minification configuration. The breaking changes are as follows:
minimizerOptions.passes: moved tominimizerOptions.compress.passesminimizerOptions.dropConsole: moved tominimizerOptions.compress.drop_consoleminimizerOptions.pureFuncs: moved tominimizerOptions.compress.pure_funcsminimizerOptions.keepClassNames: moved tominimizerOptions.mangle.keep_classnamesminimizerOptions.keepFnNames: moved tominimizerOptions.mangle.keep_fnamesminimizerOptions.comments: moved tominimizerOptions.format.commentsminimizerOptions.asciiOnly: moved tominimizerOptions.format.ascii_only
Default value changes:
comments(options.format.comments): changed fromfalseto"some"
rspack.HtmlRspackPlugin
We have aligned its configuration with html-webpack-plugin, with the following breaking changes:
excludedChunkshas been renamed toexcludeChunks- When
modeis'production',minifyis nowtrueby default
Other changes
[Important] @rspack/cli
@rspack/cli has upgraded its dependency on webpack-dev-server from v4 to v5. If you are using @rspack/cli, please be aware of the following breaking changes:
- The minimum supported Node.js version for webpack-dev-server v5 is 18.12.0.
- Several configuration options have changed. Please refer to the webpack-dev-server v5 migration guide.
[Important] ResolverFactory and Resolver refactoring with Rust
ResolverFactory and Resolver have been refactored with Rust to unify the implementations on the JS and Rust sides. Due to this change, ResolverFactory and Resolver currently do not support any hooks.
Additionally, Resolver now only supports the following methods:
resolveSyncresolvewithOptions
This change might cause some plugins to become unusable.
Rspack supports the NormalModuleFactory's resolve hook. In most cases, you can use this hook as a replacement for the Resolver's resolve hook to achieve the same functionality.

