[SOLVED] How to enable less with Meteor 3.4 / rspack?

Still having trouble with it in my real app but got a proof of concept working in a skeleton typescript/react app from meteor create and it turned out to be pretty straight-forward:

First install the required npm packages:
meteor npm install --save-dev less less-loader

Then modify rspack.config.ts:

import { defineConfig } from "@meteorjs/rspack";
import { TsCheckerRspackPlugin } from "ts-checker-rspack-plugin";

const c = defineConfig((/* Meteor */) => {
  return {
    plugins: [new TsCheckerRspackPlugin()],
    module: {
      rules: [
        {
          test: /\.less$/,
          use: [
            {
              loader: 'less-loader',
            },
          ],
          type: 'css',
        },
      ],
    },
  };
});

Source: