#14652·meteor

Rspack 2 compatibility gaps remain in @meteorjs/rspack adapters

Author: jfurneauxCreated Aug 7, 2026Updated Sep 15, 2026
LabelsType:Bugneeds-investigationmodern-build-stack

Versions

Problem

Published adapter source still emits several Rspack 1-era config/API shapes, so using Rspack 2.1.7 requires a package patch:

  1. Persistent cache is nested under experiments.cache instead of top-level cache.
  2. Meteor.setCache(false) also writes experiments.cache: false.
  3. Client config merges experiments.css: true, though CSS is no longer enabled through that experimental flag.
  4. React Refresh package v2 exposes ReactRefreshRspackPlugin; treating module namespace as constructor fails.
  5. Client/server output still uses libraryTarget instead of library: { type: ... }.
  6. 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.css merge;
  • resolve ReactRefreshRspackPlugin named export;
  • use output.library.type;
  • preserve buildContext when recomputing cache strategy.

Meteor production build, development HMR/React Refresh, persistent cache, and Linux deployment build passed after these changes.