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 10 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.
<!-- Release notes generated using configuration in .github/release.yml at v1.3.9 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.9 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.8...v1.3.9
Your coding agent can read these notes before it upgrades. Set up the MCP server →
<!-- Release notes generated using configuration in .github/release.yml at v1.3.8 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.8 -->
Rspack now experimentally exposes some SWC JavaScript APIs via rspack.experiments.swc. This allows you to call SWC methods like transform or minify without installing the additional @swc/core package.
See SWC API for more details.
<img src="https://github.com/user-attachments/assets/20c24090-3d8e-46cd-a5af-cd316f58d7c0" width="600" />
origin.loc on chunkgroup by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/10188output.clean by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/10207require.resolveWeak module method by @9aoy in https://github.com/web-infra-dev/rspack/pull/10203Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.7...v1.3.8
<!-- Release notes generated using configuration in .github/release.yml at v1.3.7 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.7 -->
The rspack.dev now provides llms.txt to help LLMs better understand Rspack:
Vec::with_capacity for hooks and plugins by @CPunisher in https://github.com/web-infra-dev/rspack/pull/10178compiler.close when having errors by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/10154null to additional data of loader context by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/10155parallel by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/10164u16::MAX for graphical reporter by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/10180need more info or awaiting more feedback by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/10171Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.6...v1.3.7
<!-- Release notes generated using configuration in .github/release.yml at v1.3.6 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.6 -->
@rspack/core by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/10048require identifier by @inottn in https://github.com/web-infra-dev/rspack/pull/10093checkVersion by @CPunisher in https://github.com/web-infra-dev/rspack/pull/10097format_args panics by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/10109optimization.removeAvailableModules config by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/10115@rspack/core by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/9899Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.5...v1.3.6
<!-- Release notes generated using configuration in .github/release.yml at release/v1.3.5 -->
<!-- Release notes generated using configuration in .github/release.yml at release/v1.3.5 -->
We’re excited to introduce next-rspack, a community-driven plugin bringing direct Rspack support to Next.js.
See the Rspack joins the Next.js ecosystem blog for details.
<img src="https://github.com/user-attachments/assets/1de66c34-bcdb-4a4f-901a-88bb7e0df8ce" width="800" />
native_fs by @CPunisher in https://github.com/web-infra-dev/rspack/pull/9999undefined by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/10030Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.4...v1.3.5
<!-- Release notes generated using configuration in .github/release.yml at v1.3.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.4 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.3...v1.3.4
<!-- Release notes generated using configuration in .github/release.yml at v1.3.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.3 -->
max_blocking_threads to 1 by @CPunisher in https://github.com/web-infra-dev/rspack/pull/9909tinypool not being able to run on older node versions by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9925AsDependency trait by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9921Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.2...v1.3.3
<!-- Release notes generated using configuration in .github/release.yml at v1.3.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.2 -->
LoaderContext APIs in parallel loader by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9884LoaderContext.fs as node:fs by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9888parallel-option would only recieve true in parallel mode by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9883Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.1...v1.3.2
<!-- Release notes generated using configuration in .github/release.yml at v1.3.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.1 -->
Added a way to run JavaScript loader in parallel driven by worker_threads, using the max thread available on the OS.
This feature is still experimental. To enable parallelism, set Rule.use.parallel = true and experiments.parallelLoader = true:
module.exports = {
module: {
rules: [
{
test: /\.less$/,
use: [
{
loader: "less-loader",
+ parallel: true,
options: { ... }
}
]
type: "css"
}
]
},
experiments: {
css: true,
+ parallelLoader: true
}
}
In big projects like 100x antd.less, we got 2.26x performance boost. (Tested on Apple M2 Max, 64G)
Related PR: https://github.com/web-infra-dev/rspack/pull/9807
No unique code generation entry for unspecified runtime panic when using with devtool: 'eval-source-map'. Related issue: https://github.com/web-infra-dev/rspack/issues/9837should have best match panic when using with rspack.CssExtractRspackPlugin. Related issue: https://github.com/web-infra-dev/rspack/issues/9833PathBuf and &Path to Context by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9848import() in node 16 by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9846Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.0...v1.3.1
<!-- Release notes generated using configuration in .github/release.yml at v1.3.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.0 -->
module.generator.json.JSONParse by @colinaaa in https://github.com/web-infra-dev/rspack/pull/9666NormalModule.loaders by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9664BuilderError by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9627getModuleId should return number for deterministic moduleIds by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9785watching.invalidateWithChangesAndRemovals() by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9789entrypoint.getEntrypointChunk to documentation by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9641experiments.outputModule default value by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9694extends configuration and blog titles by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9719modern-module docs by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/9806use statements for better clarity and consistency by @reddevilmidzy in https://github.com/web-infra-dev/rspack/pull/9578module.code_generation to async fn by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9626block_on in rspack_storage by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9700runtime_module.generate by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9701block_on in runtime modules by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9708block_on in devtool by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9717block_on in split chunk name and test by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9722block_on in split chunk filter by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9732block_on related test cases by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9735block_on in asset generator by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9733use statements for better readability by @reddevilmidzy in https://github.com/web-infra-dev/rspack/pull/9751Filename uniformly by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9813Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.8...v1.3.0
<!-- Release notes generated using configuration in .github/release.yml at v1.3.0-beta.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.0-beta.1 -->
In the past, lazy compilation required starting a separate server to handle special requests which caused port, server config and proxy inconsistency, now its core capability is encapsulated as an express style middleware.
Developers only need a few lines of code to embed lazy compilation ability into their custom development server, solving the configuration inconsistent problem of multiple service instances. Users of @rspack/cli can use it without any changes, custom dev server users can easily access it through a middleware, check the following example, you can also see more detail in our official docs.
import { experiments, rspack } from '@rspack/core';
import config from './rspack.config.mjs';
import DevServer from 'webpack-dev-server';
const compiler = rspack(config);
const middleware = experiments.lazyCompilationMiddleware(
compiler,
{
entries: true, // lazy compile entries
imports: true, // lazy compile dynamic imports
...config.experiments?.lazyCompilation
}
);
const server = new DevServer(compiler, {
port: 3000,
setupMiddlewares(other) {
return [middleware, ...other];
},
});
server.start();
We added a built-in plugin CircularDependencyRspackPlugin to Rspack to detect circular dependencies between runtime modules.
Since the plugin is based on Rust, it is directly integrated with the Rspack module graph, avoiding expensive copying and serialization costs. The plugin traverses the module graph of each entry once to find all circular references, rather than checking modules individually, which means that the performance of the plugin is better.
Usage reference:
import { rspack } from '@rspack/core';
const config = {
plugins: [
new rspack.CircularDependencyRspackPlugin({
failOnError: true,
})
]
}
getModuleId should return number for deterministic moduleIds by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9785extends configuration and blog titles by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9719block_on in devtool by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9717block_on in split chunk name and test by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9722block_on in split chunk filter by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9732block_on related test cases by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9735block_on in asset generator by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9733use statements for better readability by @reddevilmidzy in https://github.com/web-infra-dev/rspack/pull/9751Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.3.0-beta.0...v1.3.0-beta.1
<!-- Release notes generated using configuration in .github/release.yml at v1.3.0-beta.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.3.0-beta.0 -->
extends optionThe rspack.config.js now supports an extends option, which is used to extend configurations from other files or packages. This allows you to create a base configuration and extend it for different environments or use cases.
Example usage:
export default {
extends: './base.rspack.config.mjs',
// Override or add to the base configuration
output: {
filename: '[name].bundle.js',
},
};
Special thanks to @hulin32 for contributing this feature: #9617. 🎉
BuilderError by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9627module.generator.json.JSONParse by @colinaaa in https://github.com/web-infra-dev/rspack/pull/9666NormalModule.loaders by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9664entrypoint.getEntrypointChunk to documentation by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9641experiments.outputModule default value by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9694use statements for better clarity and consistency by @reddevilmidzy in https://github.com/web-infra-dev/rspack/pull/9578module.code_generation to async fn by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9626block_on in rspack_storage by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9700runtime_module.generate by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9701block_on in runtime modules by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9708Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.8...v1.3.0-beta.0
docs: deprecate sri option of HTML plugin by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9610
<!-- Release notes generated using configuration in .github/release.yml at v1.2.8 -->
Bumped Mimalloc to v3 to lift memory usage issue while rebuilding on macOS. https://github.com/web-infra-dev/rspack/pull/9533
A user shared the following results after testing the 1.2.8:
"The canary version solves the memory leak (almost) completely for me 🥳."
| Version | Initial Compile | After 10 HMR |
|---|---|---|
| 1.2.2 | 4.57 GB | 5.48 GB |
| 1.2.7 | 3.93 GB | 4.18 GB |
| 1.2.8-canary-3d971bbf-20250304 | 3.66 GB | 3.72 GB |
The 1.2.8 demonstrates a ~10% improvement over 1.2.7.
rspack preview support for nodeEnv flag and default env by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9543preview script and remove cross-env by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9544JSONError diagnostic in resolver by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9566entrypoint.getEntrypointChunk() by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9625innerHTML content in rendered asset tags by @faultyserver in https://github.com/web-infra-dev/rspack/pull/9526sri option of HTML plugin by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9610replace_all_placeholder by @shulaoda in https://github.com/web-infra-dev/rspack/pull/9525Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.7...v1.2.8
<!-- Release notes generated using configuration in .github/release.yml at v1.2.7 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.7 -->
On macOS, Rspack v1.2.7 is up to 20% faster than v1.2.6. See https://github.com/web-infra-dev/rspack/pull/9518 for details.
<img src="https://github.com/user-attachments/assets/268e38af-67a1-4bd4-99e9-152b04f7b03e" width="700" />
| Name | Base (2025-02-28 2b45815) | Current | Change |
|---|---|---|---|
| threejs_development-mode_10x_hmr + rss memory | 1137 MiB ± 129 MiB | 890 MiB ± 293 MiB | -21.72 % |
To find out more, follow this link; and this is the benchmark report.
maxGenerations support by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9517compiler.compile as private method by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9472Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.6...v1.2.7
Nothing published for this version
chore(codeowners): removing deprecated package by @zackarychapple in https://github.com/web-infra-dev/rspack/pull/9395
<!-- Release notes generated using configuration in .github/release.yml at release/v1.2.6 -->
blob: protocol when public path is auto by @stormslowly in https://github.com/web-infra-dev/rspack/pull/9303fast-glob to v0.4.4 by @shulaoda in https://github.com/web-infra-dev/rspack/pull/9438Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.5...v1.2.6
<!-- Release notes generated using configuration in .github/release.yml at v1.2.5 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.5 -->
Version 1.2.5 fixes compatibility issues caused by Glibc versions on Linux x86 systems in version 1.2.4.
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.4...v1.2.5
<!-- Release notes generated using configuration in .github/release.yml at v1.2.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.4 -->
This release introduces a new built-in SubresourceIntegrityPlugin to provide support for Subresource Integrity (SRI).
SubresourceIntegrityPlugin is a Rust rewrite of the webpack-subresource-integrity and is much more faster.
import { experiments } from '@rspack/core';
const { SubresourceIntegrityPlugin } = experiments;
export default {
plugins: [new SubresourceIntegrityPlugin()],
output: {
crossOriginLoading: 'anonymous',
},
};
The Rspack roadmap has been updated with new targets such as Wasm build and Rstest, see Roadmap.
--config-loader CLI option by @krutoo in https://github.com/web-infra-dev/rspack/pull/9210@rstack-dev/doc-ui by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9284SubresourceIntegrityPlugin by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/9302Diagnosable trait by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/9264replace_all_placeholder by @shulaoda in https://github.com/web-infra-dev/rspack/pull/9289replace_all_placeholder" by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9304Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.3...v1.2.4
<!-- Release notes generated using configuration in .github/release.yml at v1.2.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.3 -->
swc_core to v13 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9133@swc/types to fix missing dts files by @inottn in https://github.com/web-infra-dev/rspack/pull/9173build() for level-2 options builder by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9188asset/source module type by @haocheng6 in https://github.com/web-infra-dev/rspack/pull/9216cacheGroups example by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9129compiler.hooks.finishMake by @colinaaa in https://github.com/web-infra-dev/rspack/pull/9146output.workerChunkLoading link by @9aoy in https://github.com/web-infra-dev/rspack/pull/9194swc_core to v10.7.0 by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9125findBundle option to ensure test cases are executed by @haocheng6 in https://github.com/web-infra-dev/rspack/pull/9057EnableChunkLoadingPlugin.{setEnabled,checkEnabled} by @colinaaa in https://github.com/web-infra-dev/rspack/pull/9092chunk.getEntryOptions() by @colinaaa in https://github.com/web-infra-dev/rspack/pull/9093NormalModule last_successful_build_meta field by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/9163cow_to_ascii_uppercase and cow_to_ascii_lowercase by @shulaoda in https://github.com/web-infra-dev/rspack/pull/9126Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.2...v1.2.3
<!-- Release notes generated using configuration in .github/release.yml at v1.2.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.2 -->
Regexp with ends_with match by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9081amd option behavior with webpack by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/9103JsModule by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8939Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.1...v1.2.2
<!-- Release notes generated using configuration in .github/release.yml at v1.2.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.1 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.0...v1.2.1
<!-- Release notes generated using configuration in .github/release.yml at v1.2.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.0 -->
CachedSource by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8666substring of rspack-sources by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8731fast-glob to v0.4.1 by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8800size option for optimization.chunkIds config by @inottn in https://github.com/web-infra-dev/rspack/pull/8642WarnCaseSensitiveModulesPlugin and disable it by default by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/8697match_when_empty for rule condition by @CPunisher in https://github.com/web-infra-dev/rspack/pull/88092 to reduce bundle size by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8853config.mode and config.name by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/8920devtool to compiler options builder by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8940enforceRelative plugin option to preserve './' by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8946optimization in compiler options builder by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8979json type by @cbbfcd in https://github.com/web-infra-dev/rspack/pull/8947@rspack/tracing as peer dependency by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9008generator['asset'].importMode for Rslib by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8724loaderContext.importModule by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8766process.cwd() when outside Rspack by @colinaaa in https://github.com/web-infra-dev/rspack/pull/8845lazyCompilation.backend.client by @colinaaa in https://github.com/web-infra-dev/rspack/pull/8934lazyCompilation.backend.server option by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9009resolve.mainFields by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8703SwcJsMinimizerRspackPlugin by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8745loaderContext.importModule() by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8821avoidEntryIife added version by @fi3ework in https://github.com/web-infra-dev/rspack/pull/8892WarnCaseSensitiveModulesPlugin by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8898invalid compiler hook by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/9003span_to_location into trait SourcePosition by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8640rspack_binding_values by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8761getRawOptions as possible by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8773format! by @hamirmahal in https://github.com/web-infra-dev/rspack/pull/8228run_loaders takes a single plugin only by @wtlin1228 in https://github.com/web-infra-dev/rspack/pull/8968Compiler::builder by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9020MADV_DONTNEED than MADV_FREE on Linux by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/9037amd option behavior with webpack by @nilptr in https://github.com/web-infra-dev/rspack/pull/9011Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.8...v1.2.0
<!-- Release notes generated using configuration in .github/release.yml at v1.2.0-beta.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.0-beta.0 -->
config.mode and config.name by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/8920devtool to compiler options builder by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8940enforceRelative plugin option to preserve './' by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8946lazyCompilation.backend.client by @colinaaa in https://github.com/web-infra-dev/rspack/pull/8934avoidEntryIife added version by @fi3ework in https://github.com/web-infra-dev/rspack/pull/8892WarnCaseSensitiveModulesPlugin by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8898Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.2.0-alpha.0...v1.2.0-beta.0
<!-- Release notes generated using configuration in .github/release.yml at v1.2.0-alpha.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.2.0-alpha.0 -->
Rspack v1.2 introduced an experimental cache configuration that supports persistent caching, which can significantly improve hot startup speed.
When a build hits the cache, it can bring up to 60% performance improvement in real projects.
// rspack.config.js
module.exports = {
cache: true,
experiments: {
cache: {
type: 'persistent',
},
},
};
Note that the persistent cache is still in an early experimental stage and there is a lot of room for performance improvement.
Rspack v1.2 no longer watching the node_modules directory by default. This can greatly reduce the number of files to watch and improve performance.
According to our benchmark repo, this change will:
This change will not affect symlinked resources in monorepo, as symlinked resources are resolved to their real path by default.
Related PR: perf: ignore watching files in node_modules by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8645
The Rust crate swc_core has been upgraded to 9.0.2. Users of the SWC Wasm plugin need to ensure version consistency with the swc_core being used, otherwise, it may lead to unforeseen issues.
For more details, see SWC Plugin Version Unmatched.
Related PR: feat(core)!: bump swc_core to 9.0.0 by @andersk in https://github.com/web-infra-dev/rspack/pull/8639
We have optimized the data structure used to store strings during the rspack-sources computation process. Throughout the computation, all string data points to the string heap memory of the root node, effectively avoiding the generation of new string allocations during the computation.
Related PR: perf: reduce memory consumption of CachedSource by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8666
Rspack v1.2.0 set default SWC minimizer passes to 2 to reduce bundle size by 1%-7%.
passes is the the maximum number of times to run compress. In some cases, more than one pass leads to further compressed code. Given Rspack's inherent speed, we've determined that using 2 passes by default strikes an optimal balance between build performance and bundle size.
Related PR: feat: set default SWC minimizer passes to
2to reduce bundle size by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8853
The implementation of side effects optimization has been refactored to be simpler and more parallelism-friendly. It can take full advantage of parallelism to improve performance. In tested projects, there is typically a 2x-3x performance improvement at this stage.
Related PR: perf: parallelize side effects optimization by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/8781
The WarnCaseSensitiveModulesPlugin will check the paths of modules and issue warnings for modules that conflict when their paths are all in lowercase. We used to enable it by default, but since it is only a "linter" plugin and it has additional performance overhead especially in development mode. So now we disable it by default, and recommend to use WarnCaseSensitiveModulesPlugin to add it to your own needs.
// rspack.config.js
module.exports = {
plugins: [new rspack.WarnCaseSensitiveModulesPlugin()],
};
Related PR: feat: export
WarnCaseSensitiveModulesPluginand disable it by default by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/8697
CachedSource by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8666substring of rspack-sources by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8731fast-glob to v0.4.1 by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8800size option for optimization.chunkIds config by @inottn in https://github.com/web-infra-dev/rspack/pull/8642WarnCaseSensitiveModulesPlugin and disable it by default by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/8697match_when_empty for rule condition by @CPunisher in https://github.com/web-infra-dev/rspack/pull/8809loaderContext.importModule by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8766process.cwd() when outside Rspack by @colinaaa in https://github.com/web-infra-dev/rspack/pull/8845resolve.mainFields by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8703SwcJsMinimizerRspackPlugin by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8745loaderContext.importModule() by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8821span_to_location into trait SourcePosition by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8640rspack_binding_values by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8761getRawOptions as possible by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8773format! by @hamirmahal in https://github.com/web-infra-dev/rspack/pull/8228Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.8...v1.2.0-alpha.0
Upon discovery, we immediately deprecated the affected v1.1.7, redirected the npm latest tag to v1.1.6, and reset all related tokens. Subsequently, we…
This is a re-release version of v1.1.6
On 12/19/2024, 02:01 (UTC), we discovered that our npm packages @rspack/core and @rspack/cli were maliciously attacked. The attacker released v1.1.7 using a compromised npm token, which contained malicious code. We took immediate action upon discovering the issue.
@rspack/core and @rspack/cli v1.1.7package.json runs malicious code in dist/util/support.js. See Malicious code analysis for more details.Upon discovery, we immediately deprecated the affected v1.1.7, redirected the npm latest tag to v1.1.6, and reset all related tokens.
Subsequently, we released a secure new version v1.1.8.
If you installed v1.1.7 during the affected period, please:
@rspack/core and @rspack/cli to >= 1.1.8We deeply apologize for the risks caused by this incident. To prevent similar incidents from happening again, we will implement stricter token management protocols and enhance our security review processes.
If you have any questions or discover any suspicious activity, please create an issue or send an email to: web-infra-security@bytedance.com
We will continue to follow and respond to community feedback.
<!-- Release notes generated using configuration in .github/release.yml at v1.1.6 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.6 -->
Rspack's memory usage in large projects has been significantly reduced since v1.1.6:
<img src="https://github.com/user-attachments/assets/77136769-ab62-4382-b420-a5608875fc42" width="600" />
Related PRs:
RuntimeModule by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8620RawSource with smaller RawStringSource and RawBufferSource by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8629output.trustedTypes.onPolicyCreationFailure by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8619getResolve in external function context by @fi3ework in https://github.com/web-infra-dev/rspack/pull/8577importModule by @CPunisher in https://github.com/web-infra-dev/rspack/pull/8595CopyRspackPlugin documentation by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8621Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.5...v1.1.6
<!-- Release notes generated using configuration in .github/release.yml at v1.1.5 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.5 -->
Since #7306, we have aligned with webpack's CSS loading strategy, which assumed that CSS finished loading before executing JavaScript, which is not true. Both Rspack and webpack have changed the CSS loading strategy to address this issue.
For more specific details on the original problem, please refer to this link. Webpack fixed this in https://github.com/webpack/webpack/pull/19021 Rspack fixed this in #8534
Buffer to zero-copy BufferSlice by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8574as attr support use with dyn trait by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/8535process.title by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8576Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.4...v1.1.5
<!-- Release notes generated using configuration in .github/release.yml at v1.1.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.4 -->
as attr by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/8521WebWorkerTemplatePlugin should generate import-scripts chunk loading runtime by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8523Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.3...v1.1.4
<!-- Release notes generated using configuration in .github/release.yml at v1.1.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.3 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.2...v1.1.3
<!-- Release notes generated using configuration in .github/release.yml at changeset-release/main -->
<!-- Release notes generated using configuration in .github/release.yml at changeset-release/main -->
Rspack v1.1.2 improved the output of DefinePlugin by eliminating unused object properties from the final bundle, resulting in a smaller output size:
<img src="https://github.com/user-attachments/assets/e6e3254a-6322-4c8e-9489-6728996f9203" width="800" >
cacheable::from_byte by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/8450auto by @inottn in https://github.com/web-infra-dev/rspack/pull/8415Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.1...v1.1.2
<!-- Release notes generated using configuration in .github/release.yml at v1.1.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.1 -->
This release introduced rspack.DllPlugin and rspack.DllReferencePlugin in #8296 to be compatible with webpack's DLLPlugin and DllReferencePlugin.
DLL plugins help you improve build performance by separating rarely-changed code (like vendor dependencies) into separate bundles. The term "DLL" stands for Dynamic-link library. See here for more information.
--config-name by @andersk in https://github.com/web-infra-dev/rspack/pull/8363__webpack_layer__ by @inottn in https://github.com/web-infra-dev/rspack/pull/8381Compiler not getting freed after use by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/8268Utf8Path and FileMetadata by @jerrykingxyz in https://github.com/web-infra-dev/rspack/pull/8366Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.1.0...v1.1.1
<!-- Release notes generated using configuration in .github/release.yml at v1.1.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.0 -->
xxhash64 hash function by default by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8249disableAllLints by default to reduce overhead by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8275neo-async with a minimal helper by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8282@rspack/cli dual package and bundle with Rslib by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8187[name] in filename by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7753output.compareBeforeEmit by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8245lightingcss_rs to fix CSS property order by @GiveMe-A-Name in https://github.com/web-infra-dev/rspack/pull/8182rspack function type in cjs require by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8169pkg-preview when the needs are skipped by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8216rspack serve by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8244--target ESNext by @andersk in https://github.com/web-infra-dev/rspack/pull/8279pnpm --filter in package scripts by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8319exports.types field by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8355keepImportAttributes configuration when use Rule.with by @9aoy in https://github.com/web-infra-dev/rspack/pull/8239optimization by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8339rspack.default should not exist test by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8207lightningCssMiminizerPlugin.ts file by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8214JsRegExp by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8254RawRegex and JsRegExp by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8298Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.14...v1.1.0
<!-- Release notes generated using configuration in .github/release.yml at v1.1.0-beta.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.1.0-beta.0 -->
experiments.incrementalWe are implementing a new incremental rebuild architecture that makes the HMR much faster. It's an experimental feature in v1.1 and we still have more work to do before we stabilize it, but for now we have implemented parts of it and seen significant performance boosts.
In a case of 10000 React components, the HMR becomes 38% faster:
<img src="https://github.com/user-attachments/assets/7b8aaa3c-296b-4cfe-8bd2-25e1797f152c" width="700" />
[!tip] Checkout our docs for more details, and it's still in early stage but we hope you can try it out and provide us with some bugs and feedback at https://github.com/web-infra-dev/rspack/issues/8106.
output.hashFunctionRspack's output.hashFunction now defaults to the faster xxhash64, and the output.hashDigestLength now defaults to 16 (prev 20).
In the very large projects, this change will bring a significant performance improvement:
hyperfine --warmup 1 --runs 3 'HASH_FUNCTION=md4 node --run build:rspack' 'HASH_FUNCTION=xxhash64 node --run build:rspack'
Benchmark 1: HASH_FUNCTION=md4 node --run build:rspack
Time (mean ± σ): 11.428 s ± 0.758 s [User: 83.504 s, System: 5.808 s]
Range (min … max): 10.892 s … 12.295 s 3 runs
Benchmark 2: HASH_FUNCTION=xxhash64 node --run build:rspack
Time (mean ± σ): 9.697 s ± 0.318 s [User: 79.664 s, System: 6.127 s]
Range (min … max): 9.374 s … 10.009 s 3 runs
Summary
HASH_FUNCTION=xxhash64 node --run build:rspack ran
1.18 ± 0.09 times faster than HASH_FUNCTION=md4 node --run build:rspack
Related PR: https://github.com/web-infra-dev/rspack/pull/8249
xxhash64 hash function by default by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8249disableAllLints by default to reduce overhead by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8275neo-async with a minimal helper by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8282@rspack/cli dual package and bundle with Rslib by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8187[name] in filename by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7753output.compareBeforeEmit by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8245lightingcss_rs to fix CSS property order by @GiveMe-A-Name in https://github.com/web-infra-dev/rspack/pull/8182rspack function type in cjs require by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8169pkg-preview when the needs are skipped by @shulaoda in https://github.com/web-infra-dev/rspack/pull/8216rspack serve by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8244--target ESNext by @andersk in https://github.com/web-infra-dev/rspack/pull/8279keepImportAttributes configuration when use Rule.with by @9aoy in https://github.com/web-infra-dev/rspack/pull/8239rspack.default should not exist test by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8207lightningCssMiminizerPlugin.ts file by @SoonIter in https://github.com/web-infra-dev/rspack/pull/8214Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.14...v1.1.0-beta.0
<!-- Release notes generated using configuration in .github/release.yml at v1.0.14 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.14 -->
require.ensure by @CPunisher in https://github.com/web-infra-dev/rspack/pull/7972ResolveData type by @9aoy in https://github.com/web-infra-dev/rspack/pull/8177html-rspack-tags-plugin as an alternative by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8158Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.13...v1.0.14
<!-- Release notes generated using configuration in .github/release.yml at v1.0.13 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.13 -->
webpack-assets-manifest compatibility status by @9aoy in https://github.com/web-infra-dev/rspack/pull/8144Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.12...v1.0.13
<!-- Release notes generated using configuration in .github/release.yml at v1.0.12 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.12 -->
test option to SourceMapDevToolPlugin by @inottn in https://github.com/web-infra-dev/rspack/pull/8136-t by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8122Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.11...v1.0.12
<!-- Release notes generated using configuration in .github/release.yml at v1.0.11 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.11 -->
The Node.js code from @rspack/core is now bundled into a single bundle, making Rspack startup 30ms faster.
Benchmark 1 (Rspack 1.0.10)
Time (mean ± σ): 370.5 ms ± 12.1 ms [User: 412.9 ms, System: 68.1 ms]
Range (min … max): 357.9 ms … 395.1 ms 10 runs
Benchmark 2 (Rspack 1.0.11)
Time (mean ± σ): 335.4 ms ± 2.6 ms [User: 380.3 ms, System: 59.0 ms]
Range (min … max): 331.8 ms … 339.1 ms 10 runs
@rspack/core for faster startup by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/8072HASH_PLACEHOLDER_REGEX with simple string parsing by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7907Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.10...v1.0.11
<!-- Release notes generated using configuration in .github/release.yml at v1.0.10 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.10 -->
The swc_core crate has been upgraded from version 0.106.1 to 0.109.1. Fixed the source map error in SWC minifier when used with Sentry.
For a detailed comparison between swc versions, see the https://github.com/swc-project/swc/compare/swc_core@v0.106.1...swc_core@v0.109.1.
chunk.contentHash in PathData of compilation.getPath by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8074Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.9...v1.0.10
docs: upgrade breaking change description by @hardfist in https://github.com/web-infra-dev/rspack/pull/8012
<!-- Release notes generated using configuration in .github/release.yml at v1.0.9 -->
compilation.getPath by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/8032Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.8...v1.0.9
<!-- Release notes generated using configuration in .github/release.yml at v1.0.8 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.8 -->
swc_core has been upgraded to 0.106.0 and swc minifier source map error has been fixed by @SyMind in https://github.com/web-infra-dev/rspack/pull/7991compilation.builtModules by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7984HookMap for runtimeRequirementInTree by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7987Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.7...v1.0.8
<!-- Release notes generated using configuration in .github/release.yml at v1.0.7 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.7 -->
browserslist package by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7963Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.6...v1.0.7
<!-- Release notes generated using configuration in .github/release.yml at v1.0.6 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.6 -->
[!CAUTION] This version has a bug which requires install webpack together to work, use v1.0.7 instead
For more information, please refer to the documentation ContextReplacementPlugin.
cow-utils instead by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7908compilation.hooks.runtimeRequirementInTree by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7917emitDiagnostic by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7879compilation.addRuntimeModule by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7925testu by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7894var by @inottn in https://github.com/web-infra-dev/rspack/pull/7903extensionAlias by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7951realDependencyLocation instead of range in dependency by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7892Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.5...v1.0.6
<!-- Release notes generated using configuration in .github/release.yml at v1.0.5 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.5 -->
hideStack is set to true by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7867this.callback usage by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7855sources JavaScript API by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7876Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.4...v1.0.5
<!-- Release notes generated using configuration in .github/release.yml at v1.0.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.4 -->
ErrorSpan in dependency trait by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7841-t by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7835noImplicitAnyLet and noArrayIndexKey rules by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7843Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.3...v1.0.4
<!-- Release notes generated using configuration in .github/release.yml at v1.0.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.3 -->
compilation.chunkGroups[].origins by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7776Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.2...v1.0.3
<!-- Release notes generated using configuration in .github/release.yml at v1.0.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.2 -->
Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.1...v1.0.2
<!-- Release notes generated using configuration in .github/release.yml at v1.0.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.1 -->
create-rspackSupport for the addition of Biome / ESLint / Prettier when creating a new Rspack project:
before:
after:
in_function_scope for getters and setters by @CPunisher in https://github.com/web-infra-dev/rspack/pull/7745devServer.hot by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7711force: false by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7756Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0...v1.0.1
docs(contributing): breaking change PR format by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/6969
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0 -->
RspackError by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/6900SwcJsMinimizerRspackPluginOptions by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/6950DefinePlugin by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7045builtins.provide by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7086webpack-dev-server to v5 and no longer lock the versions by @SoonIter in https://github.com/web-infra-dev/rspack/pull/7130optimization.emitOnErrors by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7595compilation.entrypoints by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7059get_scheme allocation by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7109TraceableError by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7192Stats by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7124ModuleRule matching by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7249JavascriptParser::new by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7286Ukeys by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/7287resource_path is not a valid UTF-8 sequence by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7441to option by @9aoy in https://github.com/web-infra-dev/rspack/pull/6866factoryMeta to JsModule and optimize InnerGraphPlugin for variable decl with iife by @CPunisher in https://github.com/web-infra-dev/rspack/pull/6888DefinePlugin by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7108StatsError.moduleTrace by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7123test, include and exclude options for SwcCssMinimizerRspackPlugin by @simonxabris in https://github.com/web-infra-dev/rspack/pull/7111output.assetModuleFilename by @xc2 in https://github.com/web-infra-dev/rspack/pull/7191__webpack_get_script_filename__ by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7203publicPath options with webpack by @xc2 in https://github.com/web-infra-dev/rspack/pull/7216compilation.chunkGroups and compilation.namedChunkGroups by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7254test, include and exclude options for LightningCssMinimizerRspackPlugin by @simonxabris in https://github.com/web-infra-dev/rspack/pull/7290parser.importMeta and output.importMetaName by @xc2 in https://github.com/web-infra-dev/rspack/pull/7231compilation.chunkGroup[].isInitial() by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7406compiler.rspack by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7434moduleReason.resolvedModule by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7467node-module shim by @fi3ework in https://github.com/web-infra-dev/rspack/pull/7465isOverSizeLimit in stats by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7483stats.chunkGroup[].childAssets by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7517"loose-unrecognized-keys" for config validation by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7705ModuleFactory is not correct by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/6946glob_match by @shulaoda in https://github.com/web-infra-dev/rspack/pull/6668FileSystem trait by @hardfist in https://github.com/web-infra-dev/rspack/pull/7275truthy || any and falsy && any by @xc2 in https://github.com/web-infra-dev/rspack/pull/7277await to async module export by @CPunisher in https://github.com/web-infra-dev/rspack/pull/7308walk_block_statement to walk_statement by @CPunisher in https://github.com/web-infra-dev/rspack/pull/7410compiler.inputFileSystem type by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7597null and undefined in EnvironmentPlugin by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7617builtin:swc-loader source maps if inputSourceMap is provided by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7654Path pitfall for loader type by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7666context should be an absolute path by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7687VariableInfo by @bvanjoi in https://github.com/web-infra-dev/rspack/pull/6914serwist in community compatibility table by @JoseVSeb in https://github.com/web-infra-dev/rspack/pull/7345@rstack-dev/doc-ui to add Rslib and awesome Rspack by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/7445@module-federation/sdk to FAQ by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7669Module not found instead of Resolve Error by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7106walk_expression into create_context_dependency by @CPunisher in https://github.com/web-infra-dev/rspack/pull/6963packages/rspack/src/util from js to ts and esm by @jithyan in https://github.com/web-infra-dev/rspack/pull/7246packages/rspack/src/config from js to ts/esm by @jithyan in https://github.com/web-infra-dev/rspack/pull/7255prebundle when prepare by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7304rspack-test-tools by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7303justfile by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7526Compilation.updateAsset comment by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7628Full Changelog: https://github.com/web-infra-dev/rspack/compare/v0.7.5...v1.0.0
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-rc.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-rc.2 -->
"loose-unrecognized-keys" for config validation by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7705context should be an absolute path by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7687Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-rc.1...v1.0.0-rc.2
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-rc.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-rc.1 -->
Path pitfall for loader type by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7666@module-federation/sdk to FAQ by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7669Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-rc.0...v1.0.0-rc.1
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-rc.0 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-rc.0 -->
eval-source-mapeval-source-map is now 80% faster than the previous version, see https://github.com/web-infra-dev/rspack/pull/7630.
Now HtmlRspackPlugin uses the same syntax as html-webpack-plugin to escape a value. This can help you migrate from html-webpack-plugin to HtmlRspackPlugin more smoothly.
<%= to escape the value, <%- does not escape the value.<%- to escape the value, <%= does not escape the value.For example, if a template value is <div>Rspack</div>, the current output will be:
<!-- Input -->
<%= value %>
<%- value %>
<!-- Output -->
<div>Rspack</div>
<div>Rspack</div>
PR: https://github.com/web-infra-dev/rspack/pull/7661
optimization.emitOnErrors by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7595compiler.inputFileSystem type by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7597null and undefined in EnvironmentPlugin by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7617builtin:swc-loader source maps if inputSourceMap is provided by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7654Compilation.updateAsset comment by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7628Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-beta.5...v1.0.0-rc.0
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.5 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.5 -->
HtmlRspackPluginrspack.HtmlRspackPlugin has a lot of improvements to be more in line with the html-webpack-plugin.
hash to append compilation hashbase to inject base tagscriptLoading=systemjs-module[templatehash] in filename template, same as [contenthash]excludedChunks to excludeChunks, aligned with html-webpack-pluginmode=production& escaping in script.src and link.hrefPR: https://github.com/web-infra-dev/rspack/pull/7577
SwcCssMinimizerRspackPluginThe rspack.SwcCssMinimizerRspackPlugin has been removed to reduce binary size, please use LightningCssMinimizerRspackPlugin instead:
module.exports = {
optimization: {
minimizer: [
- new rspack.SwcCssMinimizerRspackPlugin({
+ new rspack.LightningCssMinimizerRspackPlugin({
// options
}),
],
},
};
Rspack also supports using css-minimizer-webpack-plugin.
justfile by @shulaoda in https://github.com/web-infra-dev/rspack/pull/7526Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-beta.4...v1.0.0-beta.5
docs: remove deprecated configs by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7519
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.4 -->
moduleReason.resolvedModule by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7467node-module shim by @fi3ework in https://github.com/web-infra-dev/rspack/pull/7465isOverSizeLimit in stats by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7483stats.chunkGroup[].childAssets by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7517Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-beta.3...v1.0.0-beta.4
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.3 -->
Move all SWC options to minimizerOptions:
compress option has been moved to minimizerOptions.compress.mangle option has been moved to minimizerOptions.mangle.format option has been moved to minimizerOptions.format.module option has been moved to minimizerOptions.module.module.exports = {
optimization: {
minimizer: [
new rspack.SwcJsMinimizerRspackPlugin({
- format: {
- ecma: 6,
- },
+ minimizerOptions: {
+ format: {
+ ecma: 6,
+ },
+ },
}),
],
},
};
browserslist option has been renamed to minimizerOptions.targets.module.exports = {
optimization: {
minimizer: [
new rspack.LightningCssMinimizerRspackPlugin({
- browserslist: 'Chrome >= 53',
+ minimizerOptions: {
+ targets: 'Chrome >= 53',
+ },
}),
],
},
};
PR: https://github.com/web-infra-dev/rspack/pull/7444
resource_path is not a valid UTF-8 sequence by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7441compiler.rspack by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7434@rstack-dev/doc-ui to add Rslib and awesome Rspack by @Timeless0911 in https://github.com/web-infra-dev/rspack/pull/7445Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-beta.2...v1.0.0-beta.3
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.2 -->
compilation.chunkGroup[].isInitial() by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7406walk_block_statement to walk_statement by @CPunisher in https://github.com/web-infra-dev/rspack/pull/7410Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-beta.1...v1.0.0-beta.2
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.1 -->
Rspack now supports Import Attributes by defaults:
import json from "./foo.json" with { type: "json" };
import("foo.json", { with: { type: "json" } });
PR: https://github.com/web-infra-dev/rspack/pull/7333
Rspack now supports module and chunk layers. This feature can be used by frameworks like Rsnext (The Rspack-based Next.js) to implement React Server Components.
export default {
entry: {
index: {
import: './src/index.js',
layer: 'modern',
},
'index-legacy': {
import: './src/index.js',
layer: 'legacy',
},
},
module: {
rules: [
{
test: /\.js$/,
issuerLayer: 'modern',
use: [
{
loader: 'builtin:swc-loader',
options: {
env: {
targets: 'Chrome >= 87',
},
},
},
],
},
{
test: /\.js$/,
issuerLayer: 'legacy',
use: [
{
loader: 'builtin:swc-loader',
options: {
env: {
targets: 'ie >= 11',
},
},
},
],
},
],
},
experiments: {
layers: true,
},
};
export default {
module: {
rules: [
// set `layer` for some modules
{
test: /rsc-modules/,
layer: 'rsc',
},
// set resolve options for specified layer
{
issuerLayer: 'rsc',
resolve: {
conditionNames: ['react-server', '...'],
},
},
{
// set loaders for specified layer
oneOf: [
{
issuerLayer: 'rsc',
test: /\.tsx?$/,
use: ['some-rsc-loader'],
},
{
test: /\.tsx?$/,
use: ['some-normal-loader'],
},
],
},
],
},
experiments: {
layers: true,
},
};
PR: https://github.com/web-infra-dev/rspack/pull/7330
parser.importMeta and output.importMetaName by @xc2 in https://github.com/web-infra-dev/rspack/pull/7231serwist in community compatibility table by @JoseVSeb in https://github.com/web-infra-dev/rspack/pull/7345Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-beta.0...v1.0.0-beta.1
If your project is using the SWC Wasm plugin, this will be a breaking change, and you will need to upgrade the SWC Wasm plugin to the latest version.
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-beta.0 -->
In version 1.0.0-beta.0 we have made a number of performance optimizations, which together add up to significant performance gains. According to benchmark data, Rspack's dev startup is 4.7% faster, and its prod build is 11% faster.
Detailed changes:
Stats by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7124ModuleRule matching by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7249JavascriptParser::new by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7286Ukeys by @ahabhgk in https://github.com/web-infra-dev/rspack/pull/7287@rspack/core now depends on swc_core v0.99 (previously v0.96).
If your project is using the SWC Wasm plugin, this will be a breaking change, and you will need to upgrade the SWC Wasm plugin to the latest version.
PR: https://github.com/web-infra-dev/rspack/pull/7292
@rspack/cli now depends on webpack-dev-server v5 (previously v4).
If you are using @rspack/cli, please be aware of the following breaking changes:
webpack-dev-server@5 is 18.12.0.PR: https://github.com/web-infra-dev/rspack/pull/7130
rspack/plugin-minify has been deprecated as it was a temporary package to support Terser.
Now Rspack has full support for terser-webpack-plugin. If you need to use Terser as the minimizer, we recommend using terser-webpack-plugin instead of @rspack/plugin-minify:
// rspack.config.js
- const MinifyPlugin = require('@rspack/plugin-minify');
+ const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
optimization: {
minimize: true,
minimizer: [
- new MinifyPlugin({ minifier: 'terser' }),
+ new TerserPlugin(),
],
},
};
PR: https://github.com/web-infra-dev/rspack/pull/7307
lightningcss-loader by @JSerFeng in https://github.com/web-infra-dev/rspack/pull/7214__webpack_get_script_filename__ by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7203publicPath options with webpack by @xc2 in https://github.com/web-infra-dev/rspack/pull/7216compilation.chunkGroups and compilation.namedChunkGroups by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7254test, include and exclude options for LightningCssMinimizerRspackPlugin by @simonxabris in https://github.com/web-infra-dev/rspack/pull/7290FileSystem trait by @hardfist in https://github.com/web-infra-dev/rspack/pull/7275truthy || any and falsy && any by @xc2 in https://github.com/web-infra-dev/rspack/pull/7277await to async module export by @CPunisher in https://github.com/web-infra-dev/rspack/pull/7308packages/rspack/src/util from js to ts and esm by @jithyan in https://github.com/web-infra-dev/rspack/pull/7246packages/rspack/src/config from js to ts/esm by @jithyan in https://github.com/web-infra-dev/rspack/pull/7255prebundle when prepare by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7304rspack-test-tools by @colinaaa in https://github.com/web-infra-dev/rspack/pull/7303Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-alpha.5...v1.0.0-beta.0
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-alpha.5 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-alpha.5 -->
TraceableError by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7192output.assetModuleFilename by @xc2 in https://github.com/web-infra-dev/rspack/pull/7191glob_match by @shulaoda in https://github.com/web-infra-dev/rspack/pull/6668walk_expression into create_context_dependency by @CPunisher in https://github.com/web-infra-dev/rspack/pull/6963Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-alpha.4...v1.0.0-alpha.5
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-alpha.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-alpha.4 -->
test, include and exclude options for SwcCssMinimizerRspackPlugin by @simonxabris in https://github.com/web-infra-dev/rspack/pull/7111StatsError.moduleTrace by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7123Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-alpha.3...v1.0.0-alpha.4
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-alpha.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v1.0.0-alpha.3 -->
Rspack v1.0.0-alpha.3 enabled Rust 'fat' LTO to improve performance (https://github.com/web-infra-dev/rspack/pull/7088):
DefinePlugin by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7045compilation.entrypoints by @chenjiahan in https://github.com/web-infra-dev/rspack/pull/7059get_scheme allocation by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7109DefinePlugin by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7108builtins.provide by @h-a-n-a in https://github.com/web-infra-dev/rspack/pull/7086Module not found instead of Resolve Error by @LingyuCoder in https://github.com/web-infra-dev/rspack/pull/7106Full Changelog: https://github.com/web-infra-dev/rspack/compare/v1.0.0-alpha.2...v1.0.0-alpha.3
One column per quarter.