Rspack 2 compatibility gaps remain in @meteorjs/rspack adapters
Author: jfurneauxCreated Aug 7, 2026Updated Sep 15, 2026
LabelsType:Bugneeds-investigationmodern-build-stack
Versions
- Meteor 3.5.0
@meteorjs/[email protected](peer range admits Rspack 2)@meteorjs/[email protected](explicit Rspack 2 peer range)@rspack/[email protected]@rspack/[email protected]@rspack/[email protected]@rspack/[email protected]
Problem
Published adapter source still emits several Rspack 1-era config/API shapes, so using Rspack 2.1.7 requires a package patch:
- Persistent cache is nested under
experiments.cacheinstead of top-levelcache. Meteor.setCache(false)also writesexperiments.cache: false.- Client config merges
experiments.css: true, though CSS is no longer enabled through that experimental flag. - React Refresh package v2 exposes
ReactRefreshRspackPlugin; treating module namespace as constructor fails. - Client/server output still uses
libraryTargetinstead oflibrary: { type: ... }. - Effective cache-strategy rebuild omits
buildContext, so custom build contexts share default cache directory.
Notably, 3.0.0-beta.0 explicitly targets Rspack 2 but still contains these shapes.
Expected
Rspack-2-targeted adapter should emit Rspack 2 config directly. Until then, 2.x package peer range should avoid claiming unrestricted compatibility with @rspack/core >=1.3.0, or documentation should state which Rspack major each adapter release supports.
Validated compatibility changes
We validated following narrow changes with Rspack 2.1.7:
- move persistent cache config to top-level
cache; - remove obsolete
experiments.cssmerge; - resolve
ReactRefreshRspackPluginnamed export; - use
output.library.type; - preserve
buildContextwhen recomputing cache strategy.
Meteor production build, development HMR/React Refresh, persistent cache, and Linux deployment build passed after these changes.
Source: meteor/meteor