Rspack 2.0 Ships Pure ESM Core, 1.4-Second Cached Builds, and a Single Dependency
A Rust-based bundler that runs most webpack configs with 95% API compatibility now builds 10,000-component projects in 1.4 seconds and ships with one dependency. For teams stuck on webpack, the migration cost just dropped again; for anyone auditing supply-chain risk, a single-dependency dev server resets the threat model.
Rspack 2.0 moves its core packages to pure ESM, cutting the dev-server's install footprint from 15MB to 1.4MB by bundling transitive dependencies and replacing Express with a minimal Connect-based server. A 10,000-component React benchmark clocks a cached production build at 1.4 seconds, roughly 20–25x faster than a comparable webpack 5 cached build. Persistent caching now reuses SWC minifier results, and memory usage drops over 20% when caching is on.
Tree shaking extends to CommonJS require destructuring, a new `#__NO_SIDE_EFFECTS__` annotation lets bundlers strip entire cross-module function calls when return values go unused, and Module Federation shared dependencies can be tree-shaken via runtime inference or manual export lists. Experimental React Server Components support covers `"use client"`/`"use server"` directives, compile-time RSC API checks, and HMR for both server and client components.
Breaking changes include a stricter `resolve.exportsPresence` default that errors on missing exports, removal of `module.unsafeCache`, and a requirement for Node.js 20.19+ or 22.12+. The team positions 2.0 as a deliberate departure from webpack parity—ESM-first defaults, RSC pipelines, and simplified configuration that webpack itself won't pursue.
Rspack 2.0 is the first major Rust bundler to treat webpack compatibility as a floor, not a ceiling—it keeps the migration path open while adding features (pure ESM, RSC, bundler annotations) that webpack is architecturally unlikely to adopt.
The dependency count drop from 192 to 1 matters more than the performance numbers for supply-chain security. A single-dependency dev server eliminates entire classes of transitive compromise, though the vendorization strategy means security teams can't patch transitive CVEs independently and must wait for an official release.
Persistent caching in CI is a trap if not configured deliberately. The cache key depends on `package-lock.json` and environment variables; ephemeral CI runners that don't persist `node_modules/.cache` will pay a disk-I/O penalty with zero hit-rate benefit.
The `#__NO_SIDE_EFFECTS__` annotation shifts tree-shaking power from call-site pragmas to declaration-site semantics. This is a cleaner model than `/*#__PURE__*/` because it lets the bundler reason about a function globally rather than requiring developers to annotate every call site.
Rspack's RSC support is deliberately scoped to the build pipeline, not the runtime. By leaving Streaming SSR and Server Actions to frameworks, the team avoids overcommitting to a moving spec while still enabling Modern.js and TanStack Start to ship RSC on Rspack today.