RSPack 2.0 Released

@a4xrbj1 and @sanki92 have been working on their local projects to use Rspack 2.0, and have validated the fixes needed to run properly with 2.0.

This is one of the main issues you will hit during this transition.

To sum things up for anyone wanting to try the migration, I put together some steps based on what I did on a small skeleton app to make it work:


Upgrade Meteor to Rspack 2.0

1. Install packages

meteor npm install -D --legacy-peer-deps \
  @rspack/core@2.0.1 \
  @rspack/cli@2.0.1 \
  @rspack/dev-server@2.0.1 \
  @swc/core

--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:

module.exports = defineConfig((Meteor) => ({
  externalsType: 'commonjs',
}));

3. Fix CSS

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:

module: {
  rules: [
    { test: /\.css$/, type: 'css/auto' },
  ],
},

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.