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
Latest stable
2.3.2
Last release 12 days ago
10 Nov 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
1132 releases · first in 2022
Drag across the ruler to compare, or tap a release to open it.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
<!-- Release notes generated using configuration in .github/release.yml at v0.4.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.4.2 -->
the new tree shaking implementation specifically addressing compatibility issues with webpack architecture and optimizing for reduced output size. (see below for a detailed explanation)
allow rspack to control export mangling. (see below for a detailed explanation)
ChunkGraph.getChunkModulesIterable and ChunkGraph.getChunkEntryModulesIterable by @xc2 in https://github.com/web-infra-dev/rspack/pull/4855false for optimization.splitChunks on options validation by @xc2 in https://github.com/web-infra-dev/rspack/pull/4883Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.4.1...v0.4.2
This quarter, substantial efforts were dedicated to enhancing tree shaking. While the older tree shaking method remains applicable in most scenarios, it lacks full compatibility with webpack architecture, resulting in divergent behaviors compared to webpack. Additionally, it may produce larger output in certain scenarios when contrasted with webpack. For example, efforts were made to address these issues and optimize tree shaking for improved performance and compatibility.
One of the noteworthy enhancements is the reduction in generated output size. The revamped tree shaking is designed to produce leaner output, particularly when compared to certain scenarios with the previous tree shaking implementation. Here is an example:
source
// index.js
import { a } from './lib.js'
a
// lib.js
export * from './a.js'
// a.js
export const a = 3;
export const b = 3;
package.json
{
"sideEffects": false
}
rspack.config.js
const rspack = require("@rspack/core");
/** @type {import('@rspack/core').Configuration} */
const config = {
entry: "./src/index.js",
plugins: [
],
experiments: {
rspackFuture: {
newTreeshaking: false // `newTreeshaking` disable by default
}
},
optimization: {
moduleIds:"named", // use nanmed moduleIds and disable `minize` for better demonstration
minimize: false
},
};
module.exports = config;
Since the whole module is side effects free, we could directly import a from a.js . This could eliminate lib.js in output.
// skip runtime code ...
var __webpack_modules__ = {
"./src/a.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
a: function() { return a; }
});
const a = 3;
const b = 3;
}),
"./src/index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */"./src/lib.js");
_lib__WEBPACK_IMPORTED_MODULE_0__.a;
}),
"./src/lib.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */var _a__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./a */"./src/a.js");
__webpack_require__.es(_a__WEBPACK_IMPORTED_MODULE_0__, __webpack_exports__);
}),
}
enable experiments.rspackFuture.newTreeshaking
const rspack = require("@rspack/core");
/** @type {import('@rspack/core').Configuration} */
const config = {
// ...
experiments: {
rspackFuture: {
- newTreeshaking: false
+ newTreeshaking: true
}
},
// ...
};
module.exports = config;
output
var __webpack_modules__ = {
"./src/a.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
a: function() { return a; }
});
const a = 3;
const b = 3;
}),
"./src/index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */"./src/a.js");
_lib__WEBPACK_IMPORTED_MODULE_0__.a;
}),
}
The new treeshaking implementation is still undergoing stability testing; hence, it remains disabled by default. If you wish to experiment with it, you can enable it by using the following:
const rspack = require("@rspack/core");
/** @type {import('@rspack/core').Configuration} */
const config = {
// ...
experiments: {
rspackFuture: {
newTreeshaking: true
}
},
// ...
};
module.exports = config;
more details you could refer: https://www.rspack.dev/config/experiments.html#experimentsrspackfuturenewtreeshaking and related options:
optimization.mangleExports allows to control export mangling.
Reuse the previous example, making slight modifications for a better explanation.
// index.js
- import { aaa } from './lib.js'
+ import { aaa } from './lib.js'
- a
+ aaa
// lib.js
export * from './a.js'
// a.js
- export const aaa = 3;
+ export const aaa = 3;
export const b = 3;
Enable experiments.rspackFuture.newTreeshaking and optimization.mangleExports
The export of module src/a.js was condensed into a single letter, leading to a decrease in the overall output size.
var __webpack_modules__ = {
"./src/a.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
__webpack_require__.d(__webpack_exports__, {
P: function() { return aaa; }
});
const aaa = 3;
const b = 3;
}),
"./src/index.js": (function (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./lib */"./src/a.js");
_lib__WEBPACK_IMPORTED_MODULE_0__.P;
}),
}
Note this feature is not stable yet, and requires experiments.rspackFuture.newTreeshaking to be enabled.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
<!-- Release notes generated using configuration in .github/release.yml at v0.4.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.4.1 -->
compiler.hooks.shouldEmit hook: Return a boolean telling whether to emit.compilation.hooks.childCompiler hook: Executed after created a childCompiler.splitChunks.cacheGroups.{cacheGroup}.testsplitChunks.{cacheGroup}.{test, name} by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4722Compiler.shouldEmit by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4742compilation.hooks.childCompiler by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4773format.inline_script by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4786visit_prop anyway in inner_graph by @IWANABETHATGUY in https://github.com/web-infra-dev/rspack/pull/4683dep.call=true in call_expr or tagged template's tag by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/4701SplitChunkPlugin once by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4766chunkName and entryPointChunk by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4795Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.4.0...v0.4.1
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Deprecating builtins.react.refresh
<!-- Release notes generated using configuration in .github/release.yml at v0.4.0 --> <p> <img src="https://camo.githubusercontent.com/0031034bed5d18377d57e2373390fba81f40f5e341a281188ed36d9c086aa2b9/68747470733a2f2f6c66332d7374617469632e62797465646e73646f632e636f6d2f6f626a2f6564656e2d636e2f7a712d75796c6b76542f6c6a68775a74686c61756b6a6c6b756c7a6c702f52737061636b2d313835302e706e67"/> </p>
Read the announcement blog post: Announcing Rspack 0.4.
Check out our migration guide for in-depth migration details.
ContextDependency by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4682experiments.incrementalRebuild add deprecation warning by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/4727Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.3.14...v0.4.0
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.