NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #4399 most downloaded on npm
Node binding for rspack
Last release 6 days ago
28 Sep 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
1125 releases · first in 2022
One column per quarter.
feat: support JavaScript URL entries with factory type probes by @intellild in #15666
Full Changelog: v2.2.7...v2.2.8
Smaller bundles with improved code splitting
The new optimization.splitChunks.dedupDepth option lets Rspack spend more build time finding shared code and reducing duplication, giving you more control over the balance between bundle size and build time. In one application with many routes, this option reduced total output size by 9.9%.
It defaults to 1 in production and 0 in development. #15497
This release reduces repeated work and allocations during chunk graph construction and CSS Modules class name generation. JavaScript loaders also avoid copying their input content on each invocation, further reducing processing overhead.
Full Changelog: v2.2.6...v2.2.7
feat(loader): support buildInfo custom fields in parallel loaders by @stormslowly in #15629
Full Changelog: v2.2.5...v2.2.6
feat: expose new cache options and enable cache store in rebuild by @ahabhgk in #15690
Full Changelog: v2.2.4...v2.2.5
CSS-only entries using native CSS support now emit standalone stylesheets without an unnecessary JavaScript bundle. Standalone runtime chunks are also
CSS-only entries using native CSS support now emit standalone stylesheets without an unnecessary JavaScript bundle. Standalone runtime chunks are also omitted when no JavaScript entry needs them, making it easier to build CSS assets directly. See #14879.
Native CSS support now recognizes webpackIgnore and its rspackIgnore alias for @import, url(), and image-set() dependencies. This lets you leave selected references for the browser to load instead of resolving and bundling them. See #15314.
With experiments.newCache, parent and child compilers now coordinate access to shared persistent cache storage while keeping their entries separate. This prevents conflicting writes and cleanup from losing cached data, and allows both parent and child modules to be restored across compiler restarts. See #15616.
Full Changelog: v2.2.3...v2.2.4
CSS Import and Asset URL Externals
Rspack now supports asset, asset-url, and css-import external types, allowing CSS to reference stylesheets and assets hosted elsewhere. External @import statements preserve layer, supports, and media conditions, so conditional styles stay conditional in the emitted CSS. #15431, #15522.
With experiments.nativeWatcher enabled, watchOptions.ignored now accepts a function, making it easier to reuse existing ignore rules when switching to the native watcher. File event processing has also been improved to reduce event loss during large bursts of changes on Linux. #15254.
Relative imports such as ./utils and ../shared no longer trigger unnecessary tsconfig loading or tracking of its project-reference tree. This reduces configuration reads and dependency tracking, especially in large TypeScript projects with many project references. #15492.
ignored option by @stormslowly in #15254swc_core from 77.0.0 to 77.1.2 by @tusharsingh308 in #15421Full Changelog: v2.2.2...v2.2.3
feat(cache): add intrastructure logging to the new cache by @ahabhgk in #15338
Full Changelog: v2.2.1...v2.2.2
The names introduced in 2.2.0 remain available as deprecated compatibility aliases, but we recommend upgrading to Rspack 2.2.1 and using the corrected…
compact-hashed IDs namingRspack 2.2.0 introduced compact hashed module and chunk IDs under the mistakenly named compat-hashed option and CompatHashedModuleIdsPlugin / CompatHashedChunkIdsPlugin APIs. Rspack 2.2.1 corrects these names to compact-hashed, CompactHashedModuleIdsPlugin, and CompactHashedChunkIdsPlugin.
The names introduced in 2.2.0 remain available as deprecated compatibility aliases, but we recommend upgrading to Rspack 2.2.1 and using the corrected names:
module.exports = {
optimization: {
moduleIds: 'compact-hashed',
chunkIds: 'compact-hashed',
},
};Full Changelog: v2.2.0...v2.2.1
🎉 See Announcing Rspack 2.2 for more details.
Full Changelog: v2.1.10...v2.2.0
feat: integrate module code generation to the new cache by @ahabhgk in #15194
Full Changelog: v2.2.0-beta.1...v2.2.0-rc.0
This is a breaking change for RSC framework integrations. Upgrade react-server-dom-rspack to 0.1.0 and update any code that relies on the previous exp…
Rspack now emits Client Component exports as registered client references directly. CSS imported by a Client Component is no longer injected by wrapping its exports with generated <link> elements; the stylesheet is preinitialized from the React Flight payload instead. This preserves client-reference identity, including default, named, CommonJS, and non-component exports. Explicit link generation remains available through import.meta.rspackRsc.loadCss().
This is a breaking change for RSC framework integrations. Upgrade react-server-dom-rspack to 0.1.0 and update any code that relies on the previous export-wrapper behavior.
swc_core is upgraded from 76 to 77, which changes the serialized AST encoding across the SWC Wasm plugin boundary. Plugins compiled against an earlier SWC schema no longer load and the build fails with The version of the SWC Wasm plugin you're using might not be compatible with 'builtin:swc-loader'. Rebuild your plugin, or upgrade to an SWC 77 compatible release .
Use plugins.swc.rs to find the plugin version matching your Rspack release, and see SWC plugin version mismatch for details. SWC 77 also introduces dedicated FunctionBody and ArrowFunctionBody::FunctionBody AST nodes, a breaking change for Rust-side consumers of the SWC AST.
CSS identifier escaping and unescaping now follow the CSS Syntax standard, so Unicode identifiers are emitted directly instead of carrying unnecessary backslashes.
.😍 {
color: red;
}now generates .style_modules_css-😍 rather than .style_modules_css-\😍.
CSS Modules coverage also expands to more webpack cases — local/global modes, generator options, ICSS @value, custom identifiers, and warning order — and dependency collection moves into css-module-lexer, so stylesheets are no longer rescanned with regular expressions after parsing.
Full Changelog: v2.1.10...v2.2.0-beta.1
Nothing published for this version
Note Removed noisy import.meta warnings
Note
Removed noisy import.meta warnings
Rspack 2.1.9 introduced warnings for unknown import.meta properties. Because they proved overly noisy in real-world builds, Rspack 2.1.10 removes them to reduce unnecessary diagnostics for custom or runtime-specific extensions. See #15166 for detail.
new URL targets in new-url-relative mode by @elecmonkey in #15155context from loaded config by @stormslowly in #15162Full Changelog: v2.1.9...v2.1.10
feat: warn on unknown import.meta properties by @intellild in #14785
swc_core from 72 to 76 by @CPunisher in #15122Full Changelog: v2.1.8...v2.1.9
Rspack now supports cache.name and cache.storage.location, aligning with webpack's persistent cache semantics. cache.storage.directory is now the base
Rspack now supports cache.name and cache.storage.location, aligning with webpack's persistent cache semantics. cache.storage.directory is now the base directory, while the final cache location defaults to <directory>/<cache.name>. Default cache paths remain unchanged.
If you previously used storage.directory as the exact cache path, migrate it to storage.location. Existing cache data is not migrated automatically.
cache: {
type: 'persistent',
storage: {
type: 'filesystem',
- directory: '/custom/cache',
+ location: '/custom/cache',
},
}
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.7...v2.1.8
> Notice: The import.meta.env experimental feature introduced in Rspack 2.1.6 has been removed in Rspack 2.1.7.
Notice: The
import.meta.envexperimental feature introduced in Rspack 2.1.6 has been removed in Rspack 2.1.7.
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.6...v2.1.7
feat: support import.meta.env by @intellild in https://github.com/web-infra-dev/rspack/pull/14483
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.5...v2.1.6
fix: respect runtime mode in mf identifiers by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/14782
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.4...v2.1.5
module.parser.javascript.importMeta now accepts an object so each known import.meta property can be configured independently, on top of the existing t
import.meta parser optionsmodule.parser.javascript.importMeta now accepts an object so each known import.meta property can be configured independently, on top of the existing true / false / 'preserve-unknown' values. Properties set to false are preserved for runtime evaluation, omitted properties keep their default behavior, and unknown properties are preserved. Both webpack-compatible keys (dirname, filename, main, url, webpack, webpackContext) and Rspack-specific keys (rspackHash, rspackPublicPath, glob, ...) are supported.
export default {
module: {
parser: {
javascript: {
importMeta: {
// keep `import.meta.url` for runtime evaluation
url: false,
// keep the compile-time replacement of `import.meta.webpack`
webpack: true,
},
},
},
},
};
module.parser.javascript.worker now accepts an object form with alias and url, alongside the existing boolean and string[] forms. With url: 'new-url-relative' and output.module enabled, Rspack emits a static new URL() expression for new Worker(new URL(..., import.meta.url)) instead of runtime code, honoring output.publicPath and output.workerPublicPath.
export default {
output: {
module: true,
chunkFilename: '[name].bundle.js',
},
module: {
parser: {
javascript: {
worker: {
url: 'new-url-relative',
},
},
},
},
};
new Worker(new URL('./worker.js', import.meta.url));
// would become 👇
new Worker(new URL('./worker.bundle.js', import.meta.url));
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.3...v2.1.4
feat: add name/value accessors to ESMExportSpecifierDependency (#14641 by @yashwanth195)
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.2...v2.1.3
<!-- obsidian --> Rspack now exposes more module variables through import.meta , which aligns better with the ESM specification than CommonJS-style in
import.meta style module variables<!-- obsidian --><p>Rspack now exposes more module variables through <code>import.meta</code>, which aligns better with the ESM specification than CommonJS-style injected globals. When authoring ESM modules, <code>import.meta</code> is now the recommended way to access these runtime values.</p> <p>The newly supported <code>import.meta</code> properties are:</p>
| New import.meta API | Existing runtime variable |
|---|---|
import.meta.rspackPublicPath |
__webpack_public_path__ |
import.meta.rspackBaseUri |
__webpack_base_uri__ |
import.meta.rspackShareScopes |
__webpack_share_scopes__ |
import.meta.rspackInitSharing |
__webpack_init_sharing__ |
import.meta.rspackNonce |
__webpack_nonce__ |
import.meta.rspackUniqueId |
__rspack_unique_id__ |
import.meta.rspackVersion |
__rspack_version__ |
import.meta.rspackHash |
__webpack_hash__ |
import.meta style module variables (#14539 by @LingyuCoder)Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.1...v2.1.2
feat(rsdoctor): add dependencyId and loc to export usage edges by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/14577
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.0...v2.1.1
feat: expose module error JS API by @SyMind in https://github.com/web-infra-dev/rspack/pull/14351
getProvidedExports() to JS API by @logonoff in https://github.com/web-infra-dev/rspack/pull/14349in on ESM imports by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14426maxGenerations to maxVersions by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14545overrideStrict for ContextModule by @colinaaa in https://github.com/web-infra-dev/rspack/pull/14361dim() in graphical renderer by @ruanyl in https://github.com/web-infra-dev/rspack/pull/14561Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.8...v2.1.0
feat: make persistent cache max generations default to 3 by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14534
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.1.0-beta.0...v2.1.0-rc.0
React projects can now use React Compiler directly through Rspack's built-in SWC loader. See the React Compiler guide for details.
builtin:swc-loaderReact projects can now use React Compiler directly through Rspack's built-in SWC loader. See the React Compiler guide for details.
export default {
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
loader: 'builtin:swc-loader',
options: {
jsc: {
transform: {
reactCompiler: true,
},
},
},
},
],
},
};
Rspack's side-effect-free function analysis is now enabled by default in production builds. It can detect pure function calls through the #__NO_SIDE_EFFECTS__ notation and pureFunctions configuration, including exported functions across module boundaries. When the returned value is unused, Rspack can remove the call more reliably and improve tree shaking results without extra configuration. See experiments.pureFunctions for details.
// lib.js
/*@__NO_SIDE_EFFECTS__*/
export function call() {
console.log('hi')
}
// barrel.js
import { call } from './lib'
const value = call()
// if value is unused, call can be removed
export { value }
<img width="873" height="479" alt="image" src="https://github.com/user-attachments/assets/44b3e233-18cc-4be0-b3b1-a1697c649424" />
getProvidedExports() to JS API by @logonoff in https://github.com/web-infra-dev/rspack/pull/14349in on ESM imports by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/14426overrideStrict for ContextModule by @colinaaa in https://github.com/web-infra-dev/rspack/pull/14361Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.8...v2.1.0-beta.0
fix: temporarily revert JS parser changes causing runtime errors by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14343
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.7...v2.0.8
> v2.0.7 has been deprecated because it may generate incorrect Rspack build outputs.
[!WARNING] v2.0.7 has been deprecated because it may generate incorrect Rspack build outputs.
Please do not install or use v2.0.7. Upgrade to v2.0.8 instead, which was released as the fix for this issue.
container, function, grid and pure by @intellild in https://github.com/web-infra-dev/rspack/pull/14189output.library.type: 'jsonp' by @logonoff in https://github.com/web-infra-dev/rspack/pull/14278Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.6...v2.0.7
RSC builds now validate the server-only and client-only marker packages. Importing a client-only module from a server-graph module (or a server-only m
server-only / client-only boundariesRSC builds now validate the server-only and client-only marker packages. Importing a client-only module from a server-graph module (or a server-only module from a client-graph module) is reported as a diagnostic. This marker-package validation always runs and is independent of disableClientApiChecks, which now only scopes the React client-API checks.
// server component (server graph)
import 'client-only'; // ❌ reported: client-only imported in a server module
// client component (client graph)
import 'server-only'; // ❌ reported: server-only imported in a client module
DeterministicModuleIdsPluginThe webpack-compatible deterministic module id plugin is now exposed through the JS API as rspack.ids.DeterministicModuleIdsPlugin, giving you fine-grained control over module ids for long-term caching. It supports the webpack options test, maxLength, salt, fixedLength, and failOnConflict.
const rspack = require('@rspack/core');
module.exports = {
optimization: { moduleIds: false },
plugins: [
new rspack.ids.DeterministicModuleIdsPlugin({
maxLength: 5,
failOnConflict: true,
}),
],
};
composes cascade orderCSS Modules now use a shared topological sort to keep the source order of composes, so composed declarations land in the output cascade in the order you authored them. This fixes subtle specificity surprises when composing local class names across modules.
swc_exp and swc_core from 66 to 68 by @CPunisher in https://github.com/web-infra-dev/rspack/pull/14241Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.5...v2.0.6
Rspack now supports import.meta.glob, a file-system import API already available in Vite and Turbopack. We chose to align with this ecosystem behavior
import.meta.globRspack now supports import.meta.glob, a file-system import API already available in Vite and Turbopack. We chose to align with this ecosystem behavior.
const pages = import.meta.glob('./pages/**/*.tsx', {
eager: true,
import: 'default',
query: { layout: 'docs' },
base: './pages',
});
CSS modules can now control parsing for @import, animations, custom idents, and dashed idents through module.parser, so projects can match existing CSS Modules behavior more closely while migrating to Rspack.
export default {
module: {
parser: {
'css/module': {
import: true,
animation: true,
customIdents: true,
dashedIdents: true,
},
},
},
};
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.4...v2.0.5
Inline const with module declarations (#14032): Previously, Rspack only inlined constant exports from leaf modules in the module graph. Now constant e
Inline const with module declarations (#14032): Previously, Rspack only inlined constant exports from leaf modules in the module graph. Now constant exports from any module can be inlined, even when that module also imports or re-exports other modules. In rare circular-reference cases this can make a TDZ error disappear, but we do not expect real projects to rely on TDZ errors, so Rspack prioritizes the optimization.
// constants.js
import './setup';
export const ENABLE_EXPERIMENT = false;
// entry.js
import { ENABLE_EXPERIMENT } from './constants';
if (ENABLE_EXPERIMENT) {
runExperiment();
}
// Before: constants.js is not a leaf module, so the branch could keep
// reading the imported binding.
if (ENABLE_EXPERIMENT) {
runExperiment();
}
// Now: the constant can still be inlined, so dead branches are easier
// to remove.
if (false) {
runExperiment();
}
Tree shake namespace default reexport (#13980): Previously, the import * as a from './a'; export default a; pattern did not tree-shake a through the default export. Now Rspack further analyzes the default-exported namespace object and can remove unused exports from the original namespace module.
// a.js
export function used() {}
export function unused() {}
// bridge.js
import * as a from './a';
export default a;
// app.js
import a from './bridge';
a.used();
// Before: both used and unused could be kept in the bundle.
// Now: unused can be tree-shaken.
CSS global module type (#13988): css/global is useful when most selectors in a stylesheet should stay global, but you still want CSS Modules features for selected local selectors. This makes it easier to migrate existing global CSS gradually without turning every class name into a local scoped name.
export default {
module: {
rules: [{ test: /\.global\.css$/i, type: 'css/global' }],
},
};
/* style.global.css */
.button {
color: red;
}
:local(.title) {
font-weight: 600;
}
.button stays global, while .title is renamed as a local class.
CSS Modules local ident options (#14009): CSS Modules now support local ident hash options such as hash function, digest, digest length, and salt. These options make generated class names more configurable and better aligned with webpack-compatible CSS Modules setups.
export default {
module: {
rules: [{ test: /\.module\.css$/i, type: 'css/module' }],
generator: {
'css/module': {
localIdentName: '[name]__[local]__[hash]',
localIdentHashFunction: 'xxhash64',
localIdentHashDigest: 'hex',
localIdentHashDigestLength: 8,
localIdentHashSalt: 'my-salt',
},
},
},
};
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.3...v2.0.4
<!-- Release notes generated using configuration in .github/release.yml at v2.0.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v2.0.3 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.2...v2.0.3
<!-- Release notes generated using configuration in .github/release.yml at v2.0.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v2.0.2 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.1...v2.0.2
<!-- Release notes generated using configuration in .github/release.yml at v2.0.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v2.0.1 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.0...v2.0.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →