--legacy-peer-deps is needed because @meteorjs/rspack still pins Rspack 1.x peers. @swc/core is required because 2.0 no longer installs it transitively.
2. Fix externals
Rspack 2.0 changed the default externalsType, which breaks scoped or Meteor-style names. Set it explicitly in the rspack.config.js file of your local project:
experiments.css was removed. experiments: { css: true } was part of @meteorjs/rspack defaults. Now you need to opt in per rule in the rspack.config.js file of your local project , otherwise .css files are parsed as JS:
Use css/auto if you have both regular CSS and .module.css.
Expect rough edges
@meteorjs/rspack last version (1.x.x / 2.x.x) predates Rspack 2.0. Other issues will likely follow the same pattern, defaults in 1.x that 2.0 removed. (Upgrading from v1 to v2 - Rspack)
Please try them out in your project and provide feedback here or in the GitHub issues section so we can track them all.
There may only be a few issues, like the one posted above and described in the Rspack 2.0 changelog. But just in case, we can move this verification work forward together.
We will address this in a future Meteor core release (Support Rspack 2.x by nachocodoner · Pull Request #14360 · meteor/meteor · GitHub), once we verify all examples and E2E tests still behave correctly and allow time for broader testing. In the meantime, it’s great that this can already move forward at the project level and that people are sharing solutions.