Frontend Development 12 min read

Rspack 0.2 Release: New Features, Plugin Hooks, realContentHash, ESM/System Format, SplitChunksPlugin Improvements, Compatibility Updates, and Breaking Changes

Rspack 0.2 introduces numerous enhancements such as realContentHash, DataURI and ESM/System format support, extensive loader and plugin hook compatibility with Webpack, a refactored SplitChunksPlugin, updated framework integrations, benchmark comparisons, and several breaking changes to align filename generation with Webpack standards.

ByteDance Web Infra
ByteDance Web Infra
ByteDance Web Infra
Rspack 0.2 Release: New Features, Plugin Hooks, realContentHash, ESM/System Format, SplitChunksPlugin Improvements, Compatibility Updates, and Breaking Changes

Since the release of Rspack 0.1, the project has received extensive community feedback, and version 0.2 adds many new features including realContentHash, DataURI, and ESM format support, while strengthening Webpack compatibility and polishing numerous details.

The 0.2 release completes most Loader API compatibility, adding support for inline match resource, pitching loader, and inline loader, improving compatibility with Webpack loaders. More information can be found at the Loader API link.

New plugin hooks have been added, including Compiler hooks (beforeCompile, afterCompile), Compilation hooks (optimizeModules, optimizeChunkModule, finishModules, chunkAsset), NormalModuleFactory hooks (beforeResolve, afterResolve, ResolveForScheme), and ContextModuleFactory hooks (beforeResolve). Detailed documentation is available at the Plugin API link.

The optimization.realContentHash option has been implemented to compute hashes based on final asset content, providing more stable hashes and better cache utilization; it is enabled by default for production builds.

ESM/System format output is now supported. Example configuration: module.exports = { experiments: { outputModule: true }, output: { chunkFormat: 'module', chunkLoading: 'import', library: { type: 'module' } };

The SplitChunksPlugin has been refactored for more predictable behavior and new options such as splitChunks.maxSize, maxAsyncSize, maxInitialSize, maxAsyncRequests, and maxInitialRequests. The new implementation is enabled by default, and can be disabled with experiments.newSplitChunks: false .

DataURI support allows virtual modules, e.g., import x from "data:text/javascript,export default 42"; . Additionally, the mimetype and scheme conditions are supported in module rules, enabling resources with the scheme "data" to be treated as separate files rather than inlined.

Breaking changes include alignment of filename generation logic with Webpack: the [ext] placeholder is no longer replaced in output.filename, output.chunkFilename, output.cssFilename, and output.cssChunkFilename. Example diff: module.exports = { output: { filename: "[name].js", chunkFilename: "async/[name].js", cssFilename: "[name].css", cssChunkFilename: "async/[name].css" } };

Other breaking changes involve default enabling of realContentHash in production, modifications to resolve.extensions, removal of the getRspackMemoryAssets export, and updates to @rspack/dev-middleware and @rspack/html-plugin exports.

Webpack compatibility updates add full support for fork-ts-checker-webpack-plugin, license-webpack-plugin, style-loader & css-loader (via experiments.css), and node-loader, with additional tracking of compatible plugins and loaders via loader-compat and plugin-compat.

Framework ecosystem updates include deep integration with Modern.js (covering 85% of framework capabilities, supporting SSR, BFF, micro‑frontend, etc.), Modern.js Doc (renamed to Rspress) with Rust‑based MDX compilation, Vue loader compatibility (experimentalInlineMatchResource), full Svelte loader support, Storybook React support with 5‑10× performance gains, preliminary Angular support, and NestJS support delivering similar performance improvements.

A benchmark comparing Rspack with esbuild is available at https://github.com/web-infra-dev/performance-compare.

The development guide (https://web-infra-dev.github.io/rspack-dev-guide/) provides comprehensive documentation, reproducible examples, and future architectural overviews.

Testing architecture includes integration of 38 examples, migration of Webpack integration tests, execution on Node 14/16/18, and an ecosystem‑ci repository for framework integration.

Nightly releases are published daily with the @nightly npm tag.

The release acknowledges numerous contributors for their work on compatibility, features, and documentation.

frontendPerformancebuild-toolRspackwebpack compatibilityplugin hooks
ByteDance Web Infra
Written by

ByteDance Web Infra

ByteDance Web Infra team, focused on delivering excellent technical solutions, building an open tech ecosystem, and advancing front-end technology within the company and the industry | The best way to predict the future is to create it

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.