unstale

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

@unstale/cli on npm

@rsbuild/core 247 changes

Breaking changes 37

  • The webpack type has been removed from api.context.bundlerType.

    2.0.0upgrade guide

  • The webpack chain plugin hook has been removed.

    2.0.0upgrade guide

  • The webpack config plugin hook has been removed.

    2.0.0upgrade guide

  • This plugin hook replaces api.onAfterStartProdServer.

    2.0.0upgrade guide

  • This plugin hook replaces api.onBeforeStartProdServer.

    2.0.0upgrade guide

  • The built-in CSS rule now has a oneOf branch for normal CSS transforms; custom loaders on CHAIN_ID.RULE.CSS should move here.

    2.0.0upgrade guide

  • The deprecated template parameters have been removed.

    2.0.0upgrade guide

  • Use htmlPlugin instead of htmlWebpackPlugin.

    2.0.0upgrade guide

  • The query parameter is removed; use ?url instead.

    2.0.0upgrade guide

  • The loader parameter now defaults to auto instead of jiti, preferring the native Node.js loader.

    2.0.0upgrade guide

  • Instance loggers are no longer affected by the global logger.override(); customized Rsbuild logs should switch to customLogger.

    2.0.0upgrade guide

  • Projects using Module Federation v1.5 through moduleFederation.options must install this optional peer dependency manually.

    2.0.0upgrade guide

  • The default Node.js target changes from Node 16 to Node 20+.

    2.0.0upgrade guide

  • Rsbuild 2.0 requires Node.js 20.19+ or 22.12+; Node.js 18 is no longer supported.

    2.0.0upgrade guide

  • With output.target set to node, output.module now defaults to ESM; projects must load ESM bundles or opt back into CommonJS.

    2.0.0upgrade guide

  • The option is removed; use Rsdoctor or register webpack-bundle-analyzer yourself through tools.rspack.

    2.0.0upgrade guide

  • The option is removed; use stats.toJson() in a custom plugin to emit a stats JSON file.

    2.0.0upgrade guide

  • The option is removed because Rspack v2 does not include Moment locales by default.

    2.0.0upgrade guide

  • The provider configuration option has been removed.

    2.0.0upgrade guide

  • The package is now published as pure ESM, affecting how projects load it.

    2.0.0upgrade guide

  • The deprecated compiler parameter has been removed.

    2.0.0upgrade guide

  • This method replaces rsbuild.onAfterStartProdServer.

    2.0.0upgrade guide

  • This method replaces rsbuild.onBeforeStartProdServer.

    2.0.0upgrade guide

  • The deprecated compiler parameter has been removed.

    2.0.0upgrade guide

  • The default host changes from 0.0.0.0 to localhost, preventing network exposure by default.

    2.0.0upgrade guide

  • In array-style proxy config, changeOrigin now defaults to true, matching record-style config.

    2.0.0upgrade guide

  • The proxy context option is replaced by pathFilter.

    2.0.0upgrade guide

  • Proxy events are configured together through the on option instead of separate onOpen, onClose, onError, onProxyReq, and onProxyRes options.

    2.0.0upgrade guide

  • The deprecated content-changed message type has been removed; use full-reload instead.

    2.0.0upgrade guide

  • The deprecated option is removed; use resolve.alias instead.

    2.0.0upgrade guide

  • The deprecated option is removed; use resolve.aliasStrategy instead.

    2.0.0upgrade guide

  • The default decorators version changes from 2022-03 to 2023-11.

    2.0.0upgrade guide

  • The webpack tools configuration option has been removed.

    2.0.0upgrade guide

  • The webpackChain tools configuration option has been removed.

    2.0.0upgrade guide

  • The default web browserslist now targets the Baseline Widely Available query from 2025-05-01, changing JavaScript and CSS transformations and polyfill behavior.

    2.0.0upgrade guide

  • Rsbuild 2.0 no longer supports webpack as a bundler.

    2.0.0upgrade guide

  • Use rspackConfig instead of webpackConfig.

    2.0.0upgrade guide

Deprecations 2

  • The option is deprecated; use server.setup instead.

    2.0.0upgrade guide

  • The option still works but is deprecated; migrate to splitChunks.

    2.0.0upgrade guide

New APIs and options 2

  • The flag enables network access on demand by using the host option.

    2.0.0upgrade guide

  • The new option replaces performance.chunkSplit and aligns with Rspack optimization.splitChunks, including presets for common strategies.

    2.0.0upgrade guide

Behavior and default changes 6

  • The built-in CSS rule now has a oneOf branch for ?inline imports.

    2.0.0upgrade guide

  • The built-in CSS rule now has a oneOf branch for ?raw imports.

    2.0.0upgrade guide

  • 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.

    2.0.0upgrade guide

  • The built-in JavaScript rule now has a oneOf branch for ?raw imports.

    2.0.0upgrade guide

  • With output.target set to node, minification remains disabled by default, preserving clearer stack traces for debugging.

    2.0.0upgrade guide

  • style-loader is upgraded from v3 to v4, and some tools.styleLoader options have changed.

    2.0.0upgrade guide

@rsbuild/core 159 changes

Breaking changes 51

  • This API has been removed and replaced with environment.entry.

    1.0.0upgrade guide

  • This API was removed and replaced with environment.entry.

    1.0.0upgrade guide

  • This API has been removed and replaced with environment.target.

    1.0.0upgrade guide

  • This API was removed and replaced with environment.target.

    1.0.0upgrade guide

  • This API has been removed and replaced with environment.htmlPaths.

    1.0.0upgrade guide

  • This API was removed and replaced with environment.htmlPaths.

    1.0.0upgrade guide

  • The default changed from <port> to an empty string, which uses location.port.

    1.0.0upgrade guide

  • The default changed from '<port>' to '' so the client uses location.port; set '<port>' to preserve the previous behavior.

    1.0.0upgrade guide

  • This configuration key has been renamed to server.open.

    1.0.0upgrade guide

  • This option was renamed to server.open.

    1.0.0upgrade guide

  • Replaces api.context.entry for accessing an environment's entry.

    1.0.0upgrade guide

  • This environment property replaces api.context.entry.

    1.0.0upgrade guide

  • Replaces api.getHtmlPaths for accessing HTML paths on an environment.

    1.0.0upgrade guide

  • This environment property replaces api.getHtmlPaths.

    1.0.0upgrade guide

  • Replaces api.context.targets for accessing an environment's target.

    1.0.0upgrade guide

  • This environment property replaces api.context.targets.

    1.0.0upgrade guide

  • HTML files are no longer minified by Rsbuild; a standalone plugin is available to support HTML minification.

    1.0.0upgrade guide

  • Rsbuild no longer minifies HTML files; a standalone plugin is available to support HTML minification.

    1.0.0upgrade guide

  • The option now supports generating web app manifests, and its type has changed to an object containing icons.

    1.0.0upgrade guide

  • The option now supports generating web app manifests, and its type has changed from a path string to an object containing icons.

    1.0.0upgrade guide

  • Rsbuild now enables lightningcss-loader by default to transform CSS files, replacing autoprefixer for vendor prefixes and improving performance.

    1.0.0upgrade guide

  • Rsbuild now enables lightningcss-loader by default to transform CSS files, replacing autoprefixer for vendor prefixes and improving performance.

    1.0.0upgrade guide

  • The hook can now be triggered multiple times in watch mode.

    1.0.0upgrade guide

  • The hook can now trigger multiple times in watch mode.

    1.0.0upgrade guide

  • The default changed from ascii to utf8; configure ascii to retain the previous behavior.

    1.0.0upgrade guide

  • The default charset changed from 'ascii' to 'utf8'; configure 'ascii' to retain the previous behavior.

    1.0.0upgrade guide

  • This option has been removed; configure the server environment's output.distPath.root instead.

    1.0.0upgrade guide

  • The option is now boolean rather than accepting a target-dependent function; use environments configuration for differing behavior.

    1.0.0upgrade guide

  • The option now has boolean type; use environments to configure it differently for each target.

    1.0.0upgrade guide

  • This option has been removed, and Rsbuild no longer minifies HTML files; use the standalone plugin to enable HTML minification.

    1.0.0upgrade guide

  • This option has been removed, and Rsbuild no longer minifies HTML files by default; use the standalone plugin for HTML minification.

    1.0.0upgrade guide

  • This option has been removed; use the standalone plugin to enable HTML minification.

    1.0.0upgrade guide

  • This option has been removed; use the standalone HTML minifier plugin if HTML minification is needed.

    1.0.0upgrade guide

  • The option no longer supports a Record<RsbuildTarget, string[]> value; use environments configuration instead.

    1.0.0upgrade guide

  • The option no longer supports the Record<RsbuildTarget, string[]> type; configure values per environment instead.

    1.0.0upgrade guide

  • The default is now 'off', reducing polyfill code and bundle size; set it to 'usage' or 'entry' if the application needs polyfills.

    1.0.0upgrade guide

  • This option has been removed; configure output.target and environments for multi-environment builds.

    1.0.0upgrade guide

  • This option has been removed; use output.target and environments for multi-environment configuration.

    1.0.0upgrade guide

  • Replaces rsbuildServer.onHTTPUpgrade for the dev server API.

    1.0.0upgrade guide

  • This API replaces rsbuildServer.onHTTPUpgrade.

    1.0.0upgrade guide

  • This API has been removed and replaced with rsbuildServer.connectWebSocket.

    1.0.0upgrade guide

  • This API was removed and replaced with rsbuildServer.connectWebSocket.

    1.0.0upgrade guide

  • This is the replacement configuration key for dev.startUrl.

    1.0.0upgrade guide

  • The target parameter was removed from the source.alias function; use environments configuration instead.

    1.0.0upgrade guide

  • The target parameter was removed from the source.alias function; configure aliases per environment instead.

    1.0.0upgrade guide

  • The default decorators version is now 2022-11; configure version: 'legacy' to retain legacy decorators.

    1.0.0upgrade guide

  • The default decorators version is now '2022-11'; configure version: 'legacy' for legacy decorators.

    1.0.0upgrade guide

  • Function usage of source.entry has been removed; use environments configuration instead.

    1.0.0upgrade guide

  • Function usage of source.entry was removed; configure entries per environment instead.

    1.0.0upgrade guide

  • This configuration option has been removed; autoprefixer can still be enabled through a PostCSS config file.

    1.0.0upgrade guide

  • This configuration option has been removed; autoprefixer can still be enabled through a PostCSS config file.

    1.0.0upgrade guide

Deprecations 2

  • The plugin is deprecated and no longer needed because lightningcss-loader is enabled by default.

    1.0.0upgrade guide

  • The plugin is deprecated and no longer needed because Rsbuild enables lightningcss-loader by default.

    1.0.0upgrade guide

New APIs and options 5

  • A new hook is triggered after executing the build of a single environment.

    1.0.0upgrade guide

  • A new hook is triggered after executing the build of a single environment.

    1.0.0upgrade guide

  • A new hook is triggered before executing the build of a single environment.

    1.0.0upgrade guide

  • A new hook is triggered before executing the build of a single environment.

    1.0.0upgrade guide

  • This option replaces dev.startUrl for configuring whether to open the server.

    1.0.0upgrade guide

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.

    1.0.0upgrade guide