From 429991b9a7c73af727e42072d51fdbe26cc8ed20 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Mon, 6 Jul 2026 21:35:00 +0100 Subject: [PATCH 1/2] docs: correct the MFv1 section of the rspack 2 design doc The delegated ModuleFederationPluginV1 never resolves @module-federation/runtime-tools under either rspack major; only the enhanced MF 1.5 plugin does, and it carries its own install error. Verified empirically and in the 1.7.12/2.1.2 sources (details on #1400). --- agent_context/rspackv2-jul2026/design.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/agent_context/rspackv2-jul2026/design.md b/agent_context/rspackv2-jul2026/design.md index 9df52a399..6b4922f66 100644 --- a/agent_context/rspackv2-jul2026/design.md +++ b/agent_context/rspackv2-jul2026/design.md @@ -87,9 +87,13 @@ Published Rspack 2 binaries do not include the perfetto trace layer, so ## Module Federation v1 -Under Rspack 2, `@module-federation/runtime-tools` is no longer installed -automatically by `@rspack/core`. `ModuleFederationPluginV1.apply` verifies -it is resolvable and raises an actionable error otherwise. +No changes required. Rspack's delegated `ModuleFederationPluginV1` does not +use `@module-federation/runtime-tools` under either major - only the +enhanced MF 1.5 plugin (`container.ModuleFederationPlugin`) resolves it, +and that plugin raises its own actionable install error. (An earlier +revision of this design added a resolvability pre-check to +`ModuleFederationPluginV1.apply`; it was dropped after verification - +see the evidence on PR #1400.) ## Types From 14662c7624f151970c779dbe2b499f93f4dd3bc1 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Mon, 6 Jul 2026 21:43:04 +0100 Subject: [PATCH 2/2] docs: sync cache accessor and react refresh details in the rspack 2 design doc - getRspackCacheConfig -> getRspackCacheConfigs: collects both cache locations so --reset-cache clears every candidate directory - legacy-cache warning stays silent when the same config already sets a top-level persistent cache - the manual refresh loader rule self-excludes the vendored runtime files --- agent_context/rspackv2-jul2026/design.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/agent_context/rspackv2-jul2026/design.md b/agent_context/rspackv2-jul2026/design.md index 6b4922f66..01199e9fe 100644 --- a/agent_context/rspackv2-jul2026/design.md +++ b/agent_context/rspackv2-jul2026/design.md @@ -56,11 +56,15 @@ identical to v1. Rspack 2 moved the persistent cache configuration from `experiments.cache` to top-level `cache` (same shape) and **silently ignores** the legacy key. -- `getRspackCacheConfig` reads both locations, so `--reset-cache` works - against configs written for either major. +- `getRspackCacheConfigs` collects the cache configuration from **both** + locations, so `--reset-cache` clears every candidate directory regardless + of which major the config was written for (with both keys set, the wrong + cache would otherwise survive a reset under v2). - Under Rspack 2 with `experiments.cache` set, `warnLegacyRspackCacheConfig` - emits a one-time warning pointing at the top-level option. The config is - left untouched — migration is the user's action. + emits a one-time warning pointing at the top-level option — unless the + same config already sets a top-level persistent cache (then the leftover + legacy key is inert and no warning fires). The config is left untouched — + migration is the user's action. ## React Refresh @@ -76,8 +80,10 @@ to top-level `cache` (same shape) and **silently ignores** the legacy key. vendored at `packages/repack/vendor/react-refresh/` (adapted from upstream plugin v2.0.2, MIT, with a LICENSE/provenance file). The `vendor/` directory ships as-is via `package.json#files` and is excluded - from linting and the babel build. There is no dependency on - `@rspack/plugin-react-refresh@1`. + from linting and the babel build. The refresh loader rule excludes the + vendored runtime files themselves (mirroring the official plugin's + self-exclusion) so they are never re-processed in symlinked-workspace + layouts. There is no dependency on `@rspack/plugin-react-refresh@1`. ## Tracing / profiling