v2.0.6
v2.0.6
View on GitHubView PackagePublished: Jun 2, 2026

Release Notes

Highlights

React Server Components: enforce server-only / client-only boundaries

RSC builds now validate the server-only and client-only marker packages. Importing a client-only module from a server-graph module (or a server-only module from a client-graph module) is reported as a diagnostic. This marker-package validation always runs and is independent of disableClientApiChecks, which now only scopes the React client-API checks.

// server component (server graph)
import 'client-only'; // ❌ reported: client-only imported in a server module

// client component (client graph)
import 'server-only'; // ❌ reported: server-only imported in a client module

Expose DeterministicModuleIdsPlugin

The webpack-compatible deterministic module id plugin is now exposed through the JS API as rspack.ids.DeterministicModuleIdsPlugin, giving you fine-grained control over module ids for long-term caching. It supports the webpack options test, maxLength, salt, fixedLength, and failOnConflict.

const rspack = require('@rspack/core');

module.exports = {
  optimization: { moduleIds: false },
  plugins: [
    new rspack.ids.DeterministicModuleIdsPlugin({
      maxLength: 5,
      failOnConflict: true,
    }),
  ],
};

CSS Modules: preserve composes cascade order

CSS Modules now use a shared topological sort to keep the source order of composes, so composed declarations land in the output cascade in the order you authored them. This fixes subtle specificity surprises when composing local class names across modules.

What's Changed

New Features 🎉

Performance 🚀

Bug Fixes 🐞

Document 📖

Other Changes

Full Changelog: https://github.com/web-infra-dev/rspack/compare/v2.0.5...v2.0.6