跪拜 Guibai
← All articles
Frontend · JavaScript · Frontend Framework

Rspack 2.2 Lands With 30+ Performance Patches and Solid 2.0 Support

By WebInfra ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

The HMR fix alone removes a scaling penalty that made hot reloads slower as CSS grew, a pain point for any large app. Combined with the Node.js chunk-splitting defaults in Rsbuild, teams get smaller SSR deployments and lower memory pressure without extra configuration.

Summary

Rspack 2.2 delivers more than 30 targeted performance improvements, cutting production build times by roughly 5% and speeding up CSS parsing by up to 3.7x. A new `compat-hashed` module ID strategy trims bundle sizes by picking the shortest stable hash prefix, while HMR no longer fetches unchanged CSS, making JavaScript hot updates consistently fast regardless of stylesheet weight.

Rsbuild 2.2 arrives alongside it with default chunk splitting for Node.js builds, which one TanStack Start user measured as a 98% reduction in server artifact size and a 73% drop in memory usage. Solid 2.0 RC support is also in, switching to Solid's Rust compiler for a claimed 20x compile-speed gain over Babel.

The broader Rstack ecosystem sees Rslint pass 500 built-in rules with full `@typescript-eslint` parity, Rstest add Module Federation and Playwright E2E testing, and Rslib adopt TypeScript 7 for 5–10x faster type generation. An Agent Plugin based on Agent Plugins 1.0 lets Copilot and Cursor pull in Rstack-specific skills directly.

Takeaways
Over 30 performance optimizations drop production build time from 1822 ms to 1725 ms in benchmarks.
CopyRspackPlugin is 3–4x faster when copying many files.
Built-in CSS parsing is 3.7x faster in dev builds and 2.9x faster in production builds.
HMR no longer requests CSS files when only JavaScript changes; hot update time stays around 5–6 ms regardless of stylesheet size.
A new `compat-hashed` module ID strategy reduces minified JS by 0.33% and gzipped JS by 0.87% in a real-world project.
`import.meta` now exposes Rspack-specific module variables, and `import.meta.glob` gains a `caseSensitive` option.
Browserslist Baseline queries are supported, e.g., `baseline widely available`.
Native bindings are now available for RISC-V 64-bit, ppc64le, and s390x Linux platforms.
Rsbuild 2.2 enables chunk splitting by default for Node.js builds, cutting server artifacts from 298 MB to 4.1 MB in one user's test.
Rsbuild supports Solid 2.0 RC with its Rust compiler, claiming a 20x compile-speed improvement over Babel.
Rslint ships over 500 built-in rules and full `@typescript-eslint` rule and preset parity.
Rstest adds Module Federation testing and a `@rstest/playwright` package for E2E tests.
Rslib 0.23.2 supports TypeScript 7 for 5–10x faster type declaration generation.
Rspress scores 100/100 on AFDocs' Agent-friendly rating.
An Rstack Agent Plugin based on Agent Plugins 1.0 works across GitHub Copilot, Codex, and Cursor.
SWC Wasm plugins must be rebuilt with SWC 77; the RSC plugin now uses React's `preinit` for client-component CSS, a breaking change.
Conclusions

Decoupling HMR latency from CSS size is a structural fix, not a micro-optimization; it eliminates a regression that grew silently with every new stylesheet.

The `compat-hashed` ID strategy is a low-risk, zero-config way to reclaim kilobytes from production bundles without changing caching semantics.

Rsbuild's Node.js chunk-splitting default turns on a capability that many SSR setups leave off, and the 98% artifact-size reduction suggests widespread under-configuration in the wild.

Solid 2.0's Rust compiler landing in Rsbuild signals that framework-level Rust tooling is moving from experimental to default, which raises the bar for Babel-based alternatives.

Rslint reaching full `@typescript-eslint` parity removes the last major reason to keep ESLint in a Rstack pipeline, consolidating the toolchain further.

The Agent Plugin play is a distribution move: embedding Rstack-specific skills into AI coding agents lowers the friction for new users who encounter the toolchain through Copilot or Cursor.

Concepts & terms
compat-hashed module ID
A module/chunk ID strategy that derives a stable hash from the module path and picks the shortest unique prefix, keeping IDs deterministic and shorter than the full `deterministic` hash.
Browserslist Baseline
A query syntax that targets browser versions based on Web Platform Baseline feature sets, such as 'widely available', instead of listing specific browser versions.
Agent Plugins 1.0
A specification that lets AI coding agents (Copilot, Codex, Cursor) load tool-specific skills via a single plugin, giving the agent context-aware knowledge of a framework or toolchain.
React Server Components (RSC) preinit
A React API that lets the server instruct the browser to start loading a resource (like a CSS file) early, before the component renders, used here to load client-component CSS without wrapping exports.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗