npm / @rsbuild/core
@rsbuild/core
What changed in @rsbuild/core 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.
88 breaking4 deprecations7 new APIs and options7 behavior and defaults
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@rsbuild/core 247 changes
Breaking changes 37
The webpack type has been removed from api.context.bundlerType.
The webpack chain plugin hook has been removed.
The webpack config plugin hook has been removed.
This plugin hook replaces api.onAfterStartProdServer.
This plugin hook replaces api.onBeforeStartProdServer.
The built-in CSS rule now has a oneOf branch for normal CSS transforms; custom loaders on CHAIN_ID.RULE.CSS should move here.
The deprecated template parameters have been removed.
Use htmlPlugin instead of htmlWebpackPlugin.
The query parameter is removed; use ?url instead.
The loader parameter now defaults to auto instead of jiti, preferring the native Node.js loader.
Instance loggers are no longer affected by the global logger.override(); customized Rsbuild logs should switch to customLogger.
Projects using Module Federation v1.5 through moduleFederation.options must install this optional peer dependency manually.
The default Node.js target changes from Node 16 to Node 20+.
Rsbuild 2.0 requires Node.js 20.19+ or 22.12+; Node.js 18 is no longer supported.
With output.target set to node, output.module now defaults to ESM; projects must load ESM bundles or opt back into CommonJS.
The option is removed; use Rsdoctor or register webpack-bundle-analyzer yourself through tools.rspack.
The option is removed; use stats.toJson() in a custom plugin to emit a stats JSON file.
The option is removed because Rspack v2 does not include Moment locales by default.
The provider configuration option has been removed.
The package is now published as pure ESM, affecting how projects load it.
The deprecated compiler parameter has been removed.
This method replaces rsbuild.onAfterStartProdServer.
This method replaces rsbuild.onBeforeStartProdServer.
The deprecated compiler parameter has been removed.
The default host changes from 0.0.0.0 to localhost, preventing network exposure by default.
In array-style proxy config, changeOrigin now defaults to true, matching record-style config.
The proxy context option is replaced by pathFilter.
Proxy events are configured together through the on option instead of separate onOpen, onClose, onError, onProxyReq, and onProxyRes options.
The deprecated content-changed message type has been removed; use full-reload instead.
The deprecated option is removed; use resolve.alias instead.
The deprecated option is removed; use resolve.aliasStrategy instead.
The default decorators version changes from 2022-03 to 2023-11.
The webpack tools configuration option has been removed.
The webpackChain tools configuration option has been removed.
The default web browserslist now targets the Baseline Widely Available query from 2025-05-01, changing JavaScript and CSS transformations and polyfill behavior.
Rsbuild 2.0 no longer supports webpack as a bundler.
Use rspackConfig instead of webpackConfig.
Deprecations 2
The option is deprecated; use server.setup instead.
The option still works but is deprecated; migrate to splitChunks.
New APIs and options 2
The flag enables network access on demand by using the host option.
The new option replaces performance.chunkSplit and aligns with Rspack optimization.splitChunks, including presets for common strategies.
Behavior and default changes 6
The built-in CSS rule now has a oneOf branch for ?inline imports.
The built-in CSS rule now has a oneOf branch for ?raw imports.
The built-in JavaScript rule now has a oneOf branch for SWC transforms; custom loaders previously added to CHAIN_ID.RULE.JS should move here.
The built-in JavaScript rule now has a oneOf branch for ?raw imports.
With output.target set to node, minification remains disabled by default, preserving clearer stack traces for debugging.
style-loader is upgraded from v3 to v4, and some tools.styleLoader options have changed.
@rsbuild/core 159 changes
Breaking changes 51
This API has been removed and replaced with environment.entry.
This API was removed and replaced with environment.entry.
This API has been removed and replaced with environment.target.
This API was removed and replaced with environment.target.
This API has been removed and replaced with environment.htmlPaths.
This API was removed and replaced with environment.htmlPaths.
The default changed from <port> to an empty string, which uses location.port.
The default changed from '<port>' to '' so the client uses location.port; set '<port>' to preserve the previous behavior.
This configuration key has been renamed to server.open.
This option was renamed to server.open.
Replaces api.context.entry for accessing an environment's entry.
This environment property replaces api.context.entry.
Replaces api.getHtmlPaths for accessing HTML paths on an environment.
This environment property replaces api.getHtmlPaths.
Replaces api.context.targets for accessing an environment's target.
This environment property replaces api.context.targets.
HTML files are no longer minified by Rsbuild; a standalone plugin is available to support HTML minification.
Rsbuild no longer minifies HTML files; a standalone plugin is available to support HTML minification.
The option now supports generating web app manifests, and its type has changed to an object containing icons.
The option now supports generating web app manifests, and its type has changed from a path string to an object containing icons.
Rsbuild now enables lightningcss-loader by default to transform CSS files, replacing autoprefixer for vendor prefixes and improving performance.
Rsbuild now enables lightningcss-loader by default to transform CSS files, replacing autoprefixer for vendor prefixes and improving performance.
The hook can now be triggered multiple times in watch mode.
The hook can now trigger multiple times in watch mode.
The default changed from ascii to utf8; configure ascii to retain the previous behavior.
The default charset changed from 'ascii' to 'utf8'; configure 'ascii' to retain the previous behavior.
This option has been removed; configure the server environment's output.distPath.root instead.
The option is now boolean rather than accepting a target-dependent function; use environments configuration for differing behavior.
The option now has boolean type; use environments to configure it differently for each target.
This option has been removed, and Rsbuild no longer minifies HTML files; use the standalone plugin to enable HTML minification.
This option has been removed, and Rsbuild no longer minifies HTML files by default; use the standalone plugin for HTML minification.
This option has been removed; use the standalone plugin to enable HTML minification.
This option has been removed; use the standalone HTML minifier plugin if HTML minification is needed.
The option no longer supports a Record<RsbuildTarget, string[]> value; use environments configuration instead.
The option no longer supports the Record<RsbuildTarget, string[]> type; configure values per environment instead.
The default is now 'off', reducing polyfill code and bundle size; set it to 'usage' or 'entry' if the application needs polyfills.
This option has been removed; configure output.target and environments for multi-environment builds.
This option has been removed; use output.target and environments for multi-environment configuration.
Replaces rsbuildServer.onHTTPUpgrade for the dev server API.
This API replaces rsbuildServer.onHTTPUpgrade.
This API has been removed and replaced with rsbuildServer.connectWebSocket.
This API was removed and replaced with rsbuildServer.connectWebSocket.
This is the replacement configuration key for dev.startUrl.
The target parameter was removed from the source.alias function; use environments configuration instead.
The target parameter was removed from the source.alias function; configure aliases per environment instead.
The default decorators version is now 2022-11; configure version: 'legacy' to retain legacy decorators.
The default decorators version is now '2022-11'; configure version: 'legacy' for legacy decorators.
Function usage of source.entry has been removed; use environments configuration instead.
Function usage of source.entry was removed; configure entries per environment instead.
This configuration option has been removed; autoprefixer can still be enabled through a PostCSS config file.
This configuration option has been removed; autoprefixer can still be enabled through a PostCSS config file.
Deprecations 2
The plugin is deprecated and no longer needed because lightningcss-loader is enabled by default.
The plugin is deprecated and no longer needed because Rsbuild enables lightningcss-loader by default.
New APIs and options 5
A new hook is triggered after executing the build of a single environment.
A new hook is triggered after executing the build of a single environment.
A new hook is triggered before executing the build of a single environment.
A new hook is triggered before executing the build of a single environment.
This option replaces dev.startUrl for configuring whether to open the server.
Behavior and default changes 1
The default is now 'off', reducing polyfill code and bundle size; set it to 'usage' or 'entry' if the application needs polyfills.