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.
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.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v0.4.4 -->
splitChunks.cacheGroups//...
optimization: {
splitChunks: {
chunks: "all",
minSize: 0,
cacheGroups: {
splitLib2: {
chunks(chunk) {
console.log(chunk);
return chunk.name !== "lib1";
},
test: /shared\.js/,
name: "shared",
},
},
},
},
...
It gives you more flexibility to control code splitting behavior
Now rspack can process file like
#!/usr/bin/env node
import { foo } from "./lib";
console.log("index", foo);
Rspack
Webpack
more details you could refer:
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.4.3...v0.4.4
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
chore: deprecate @rspack/plugin-node-polyfill by @hardfist in https://github.com/web-infra-dev/rspack/pull/4937
<!-- Release notes generated using configuration in .github/release.yml at v0.4.3 -->
optimization.splitChunks.hidePathInfoPrevents exposing path info when creating names for parts splitted by maxSize.
splitChunks.automaticNameDelimiterBy default rspack will generate names using origin and name of the chunk (e.g. vendors~main.js). This option lets you specify the delimiter to use for the generated names. doc
splitChunks.cacheGroups.{cacheGroup}.filenameSets the hint for chunk id. It will be added to chunk's filename. doc
typeof require by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/4929miette::Error as Diagnostic and rspack_error::Error by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/4892Result by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/4880Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.4.2...v0.4.3
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
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
Your coding agent can read these notes before it upgrades. Set up the MCP server →