New 3.4-beta.6 Release, Faster Builds, Smaller Bundles and Modern Setups with the Rspack integration ⚡

Awesome. Since v3.3 I started to feel that im working with a modern framework again, this takes it a step further. Just awesome. Great work @nachocodoner and meteor team.

4 Likes

Can’t wait to build something quick and maybe a real reason to update some older apps to Meteor 3.

While this is still in beta you could rename meteor: { modern: true } to something like meteor: { rspack: true }. That way a future build flag wouldn’t have to named moreModern.

1 Like

meteor: { modern: true } relates to Meteor’s bundler optimizations, not Rspack. Rspack integration depends on adding the rspack package, not modern setting. The modern option was created only for the Meteor perspective, to speed up its own bundler when processing apps, packages and other CLI processing.

Let me know how your experiments with Meteor-Rspack go, and if you get any feedback to improve it for the official version.

Some initial observations:

Something wrong with the certificate of this website.

It seems that I can no longer import /from/folder when I want to assume the index.js inside the folder and also I need to add .js extensions for all imports in the project.

The certificate issue is out of my action scope. For betas, we can live with it for now.


@paulishca: Regarding strict extension usage, I tried to reproduce it in a small app and couldn’t. I set "type": "module" in package.json but ran into other errors. I’d like a consistent repoduce it so I can provide a direct fix.

Also, can you try this in your rspack.config.js?

export default defineConfig(Meteor => {
  return {
    module: {
      rules: [
        {
          test: /\.m?js$/,
          resolve: { fullySpecified: false }, // allow extensionless ESM imports
        },
      ],
    },
  };
});

If that turns out to fix your setup, I’ll make it the default. It would help to know how to configure my app to make this error appear. Could you provide a minimal repository?

First try. I have this error. @sw/helpers is installed.

[Transpiler] Used SWC for socket-stream-client/node.js                      (package)                          🟢 Cache hit (os.linux.x86_64)
[Transpiler] Used SWC for socket-stream-client/common.js                    (package)                          🟢 Cache hit (os.linux.x86_64)
[Transpiler] Used SWC for socket-stream-client/urls.js                      (package)                          🟢 Cache hit (os.linux.x86_64)
[Transpiler] Used SWC for ecmascript/ecmascript.js                          (package)                          🟢 Cache hit (os.linux.x86_64)
=> Linted your app. No linting errors.        
W20250909-12:05:38.530(2)? (STDERR) packages/core-runtime.js:189
W20250909-12:05:38.530(2)? (STDERR)             throw error;
W20250909-12:05:38.530(2)? (STDERR)             ^
W20250909-12:05:38.530(2)? (STDERR) 
W20250909-12:05:38.531(2)? (STDERR) Error: Cannot find module '@swc/helpers/_/_async_generator_delegate'
W20250909-12:05:38.531(2)? (STDERR)     at makeMissingError (packages/modules-runtime.js:221:12)
W20250909-12:05:38.531(2)? (STDERR)     at Module.require (packages/modules-runtime.js:240:17)
W20250909-12:05:38.531(2)? (STDERR)     at Module.mod.require (/home/harry/.meteor/packages/modules/.0.20.3.13guc6xon0l++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)
W20250909-12:05:38.531(2)? (STDERR)     at Module.moduleLink [as link] (/home/harry/.meteor/packages/modules/.0.20.3.13guc6xon0l++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:102:22)
W20250909-12:05:38.532(2)? (STDERR)     at module.wrapAsync.self (/home/harry/Dev/VueGPX/.meteor/local/build/programs/server/app/app.js:121:144)
W20250909-12:05:38.532(2)? (STDERR)     at Module.wrapAsync (/home/harry/.meteor/packages/modules/.0.20.3.13guc6xon0l++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:252:8)
W20250909-12:05:38.532(2)? (STDERR)     at module (/home/harry/Dev/VueGPX/.meteor/local/build/programs/server/app/app.js:121:9)
W20250909-12:05:38.532(2)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:335:7)
W20250909-12:05:38.532(2)? (STDERR)     at Module.require (packages/modules-runtime.js:237:14)
W20250909-12:05:38.532(2)? (STDERR)     at Module.mod.require (/home/harry/.meteor/packages/modules/.0.20.3.13guc6xon0l++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:30:33)
W20250909-12:05:38.533(2)? (STDERR)     at Module.moduleLink [as link] (/home/harry/.meteor/packages/modules/.0.20.3.13guc6xon0l++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:102:22)
W20250909-12:05:38.533(2)? (STDERR)     at module.wrapAsync.self (_build/main-dev/server-meteor.js:1:1)
W20250909-12:05:38.533(2)? (STDERR)     at Module.wrapAsync (/home/harry/.meteor/packages/modules/.0.20.3.13guc6xon0l++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/@meteorjs/reify/lib/runtime/index.js:252:8)
W20250909-12:05:38.533(2)? (STDERR)     at module (_build/main-dev/server-meteor.js:1:1)
W20250909-12:05:38.533(2)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:335:7)
W20250909-12:05:38.533(2)? (STDERR)     at Module.require (packages/modules-runtime.js:237:14)
W20250909-12:05:38.533(2)? (STDERR) 
W20250909-12:05:38.533(2)? (STDERR) Node.js v22.18.0

Could you check if this solves it for you? Adding "externalHelpers": false at .swcrc as showed in the other post.

I am trying to debug this problem, but it’s hard to get the same problem on Meteor checkout, I will need to debug on published versions.

Sorry, I missed this post. Thanks, it fixes it.

my project starts. Now, will look at vue support (Vue - Rspack)

I’ve deployed a few stability betas, the latest is 3.4-beta.6. This release fixes an issue where the published and checkout versions of Meteor 3.4 behaved differently, including how project files were handled for compilation. That mismatch caused problems like the @swc/helpers reports and others, and likely RAM-related instability.

@pmogollon, @harry73, @schlaegerz: the errors with '@swc/helpers/_/_async_generator_delegate' and related should be gone. You no longer need to set "externalHelpers": false in .swcrc. Can you confirm?

I’ll move on to other issues as soon as I have reproductions. As I test existing repos and apps, I’ll ship more fixes as well.

2 Likes

Perfect. I can confirm beta.6 fixes the issue when removing the externalHelpers setting.

Thanks.

2 Likes

:+1: beta.6 fixes it

Thanks.

I have the following error:


[Rspack Client] [client-rspack]:package ...  /
  ERROR in ./node_modules/@firebase/database-compat/dist/index.standalone.js 5:25-32
    × Module not found: Can't resolve 'util' in '/home/Dev/VueGPX/node_modules/@firebase/database-compat/dist'
     ╭─[5:17]
   3 │ Object.defineProperty(exports, '__esModule', { value: true });
   4 │ 
   5 │ var require$$2 = require('util');
     ·                  ───────────────
   6 │ var require$$0 = require('buffer');
   7 │ var require$$1 = require('events');
     ╰────

My original rspack.config.js is:


import { defineConfig } from '@meteorjs/rspack';
import { VueLoaderPlugin } from 'vue-loader';

export default defineConfig(Meteor => {
  return {
    ...(Meteor.isClient && {
      module: {
        rules: [
          {
            test: /\.vue$/,
            loader: 'vue-loader',
            options: {
              // Note, for the majority of features to be available, make sure this option is `true`
              experimentalInlineMatchResource: true,
            },
          },
          {
            test: /\.(sass|scss)$/,
            use: [
              {
                loader: 'sass-loader',
                options: {
                  // using `modern-compiler` and `sass-embedded` together significantly improve build performance,
                  // requires `sass-loader >= 14.2.1`
                  api: 'modern-compiler',
                  implementation: 'sass-embedded',
                },
              },
            ],
            // set to 'css/auto' if you want to support '*.module.(scss|sass)' as CSS Modules, otherwise set type to 'css'
            type: 'css/auto',
          },
          { test: /\.css$/, use: ['postcss-loader'], type: 'css' },
        ],
      },
      plugins: [new VueLoaderPlugin()],
    }),

    resolve: {
      alias: {
        '@ui': '/imports/ui',
        '@api': '/imports/api',
        '@plugins': '/imports/plugins',
        '@server': '/server',
        '@client': '/client',
        '@packages': '/packages',
        '@tests': '/tests',
        '@public': '/public',
        '@private': '/private',
      },
    },
  };
});

and the one built by Meteor:

[Rspack Client] Config: {
  name: '[client-rspack]',
  target: 'web',
  mode: 'development',
  entry: '/home/Dev/VueGPX/_build/main-dev/client-entry.js',
  output: {
    path: '/home/Dev/VueGPX/public',
    filename: [Function: filename],
    libraryTarget: 'commonjs',
    publicPath: '/',
    chunkFilename: 'build-chunks/[id].js',
    assetModuleFilename: 'build-assets/[hash][ext][query]',
    cssFilename: 'build-chunks/[name].css',
    cssChunkFilename: 'build-chunks/[id].css'
  },
  optimization: { usedExports: true, splitChunks: { chunks: 'async' } },
  module: {
    rules: [
      {
        test: /\.(?:[mc]?js|jsx|[mc]?ts|tsx)$/i,
        exclude: /node_modules|\.meteor\/local/,
        loader: 'builtin:swc-loader',
        options: {
          jsc: {
            baseUrl: '/home/Dev/VueGPX',
            paths: {
              '/*': [ '*', '*' ],
              '@api/*': [ 'imports/api/*' ],
              '@ui/*': [ 'imports/ui/*' ],
              '@plugins/*': [ 'imports/plugins/*' ],
              '@server/*': [ 'server/*' ],
              '@client/*': [ 'client/*' ],
              '@packages/*': [ 'packages/*' ],
              '@tests/*': [ 'tests/*' ],
              '@public/*': [ 'public/*' ],
              '@private/*': [ 'private/*' ]
            },
            parser: { syntax: 'ecmascript' },
            target: 'es2015',
            transform: { react: { development: true, refresh: true } },
            externalHelpers: true
          }
        }
      },
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: { experimentalInlineMatchResource: true }
      },
      {
        test: /\.(sass|scss)$/,
        use: [
          {
            loader: 'sass-loader',
            options: { api: 'modern-compiler', implementation: 'sass-embedded' }
          }
        ],
        type: 'css/auto'
      },
      { test: /\.css$/, use: [ 'postcss-loader' ], type: 'css' }
    ]
  },
  resolve: {
    extensions: [
      '.ts',   '.tsx',
      '.mts',  '.cts',
      '.js',   '.jsx',
      '.mjs',  '.cjs',
      '.json', '.wasm'
    ],
    alias: {
      '/': '/home/Dev/VueGPX',
      '@ui': '/imports/ui',
      '@api': '/imports/api',
      '@plugins': '/imports/plugins',
      '@server': '/server',
      '@client': '/client',
      '@packages': '/packages',
      '@tests': '/tests',
      '@public': '/public',
      '@private': '/private'
    }
  },
  externals: [ /^meteor.*/ ],
  plugins: [
    RequireExternalsPlugin {
      pluginName: 'RequireExternalsPlugin',
      _externals: null,
      _externalMap: null,
      _enableGlobalPolyfill: true,
      _isEagerImport: null,
      _lastImports: null,
      _defaultExternalPrefix: 'external ',
      filePath: '/home/Dev/VueGPX/_build/main-dev/client-meteor.js',
      backRoot: '../../',
      _funcCount: 1
    },
    DefinePlugin {
      affectedHooks: 'compilation',
      name: 'DefinePlugin',
      _args: [
        {
          'Meteor.isClient': 'true',
          'Meteor.isServer': 'false',
          'Meteor.isTest': 'false',
          'Meteor.isAppTest': 'false',
          'Meteor.isDevelopment': 'true',
          'Meteor.isProduction': 'false'
        }
      ]
    },
    BannerPlugin {
      affectedHooks: undefined,
      name: 'BannerPlugin',
      _args: [
        {
          banner: '/**\n' +
            '* @file client-rspack.js\n' +
            '* @description Bundled output generated by Rspack\n' +
            '* --------------------------------------------------------------------------\n' +
            '* ⚡ Rspack Client App (Development)\n' +
            '* --------------------------------------------------------------------------\n' +
            '* • [   client-entry.js ] ──▶ [■ client-rspack.js ] ──▶ [   client-meteor.js ]\n' +
            '*\n' +
            '* This file is the bundled output generated by Rspack.\n' +
            '* It contains all application code and assets combined into one build.\n' +
            '* It is not used directly, but will be imported by the Meteor main module\n' +
            '* file (`client-meteor.js`) so that Meteor runs the Rspack bundle.\n' +
            '*\n' +
            '* ⚠️ Note: This file is autogenerated. It is not meant to be modified manually.\n' +
            '* These files also act as a cache: they can be safely removed and will be\n' +
            '* regenerated on the next build. They should be ignored in IDE suggestions\n' +
            '* and version control.\n' +
            '*/\n' +
            '\n' +
            '/* No code generated as served by HMR server */\n',
          entryOnly: true
        }
      ]
    },
    HtmlRspackPlugin {
      options: {
        inject: false,
        cache: true,
        filename: '../_build/main-dev/index.html',
        templateContent: '\n' +
          '          <head>\n' +
          '            <% for tag in htmlRspackPlugin.tags.headTags { %>\n' +
          '              <%= toHtml(tag) %>\n' +
          '            <% } %>\n' +
          '          </head>\n' +
          '          <body>\n' +
          '            <% for tag in htmlRspackPlugin.tags.bodyTags { %>\n' +
          '              <%= toHtml(tag) %>\n' +
          '            <% } %>\n' +
          '          </body>\n' +
          '        '
      }
    },
    Plugin {}
  ],
  watchOptions: { ignored: [ '**/.meteor/local/**', '**/dist/**' ] },
  devtool: 'source-map',
  devServer: {
    static: {
      directory: '/home/Dev/VueGPX/public',
      publicPath: '/__rspack__/'
    },
    hot: true,
    liveReload: true,
    port: '8080',
    devMiddleware: { writeToDisk: [Function: writeToDisk] }
  },
  experiments: { css: true }
}

[Rspack Server] [server-rspack]:package ...  -
  [server-rspack] compiled successfully in 686 ms

[Rspack Client] <i> [webpack-dev-server] Project is running at:

[Rspack Client] <i> [webpack-dev-server] Loopback: http://localhost:8080/, http://[::1]:8080/
<i> [webpack-dev-server] On Your Network (IPv4): http://192.168.1.45:8080/
<i> [webpack-dev-server] Content not from webpack is served from '/home/Dev/VueGPX/public' directory

This looks like you are trying to use node stuff on the client, you can either pull that stuff out of the client or use the node polyfill

:+1: Thanks. It was that.

With meteor-vite, this issue did not occur.

In a method code, a server code was included by this conditional statement if(!this.isSimulation). I replace it by if(Meteor.isServer)

Actually maybe this is something I can improve. If this.isSimulation is like Meteor.isClient, I will define that rule and will wipe out the contents and dependencies related where used. I can try that to see if it solves the issue.

1 Like
wreiske@Wills-MacBook-Pro-M2 meteor-react-tailwind-prettier-starter % meteor npm run start
                                              
> start
> meteor run

[[[[[ ~/Documents/GitHub/meteor-react-tailwind-prettier-starter ]]]]]

=> Started proxy.                             
Error starting Mongo (2 tries left): Cannot run replSetReconfig because the node is currently updating its configuration
=> Started MongoDB.                           
[Rspack Client Error] npm error could not determine executable to run

[Rspack Client Error] npm error A complete log of this run can be found in: /Users/wreiske/.npm/_logs/2025-09-09T22_17_50_886Z-debug-0.log

[Rspack Server Error] npm error could not determine executable to run

[Rspack Server Error] npm error A complete log of this run can be found in: /Users/wreiske/.npm/_logs/2025-09-09T22_17_50_886Z-debug-0.log

   Loading plugin `rspack` from package ...  -

After upgrading to .6 from .3, this is now occurring.

13 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
13 silly packumentCache heap:4345298944 maxSize:1086324736 maxEntrySize:543162368
14 http fetch GET 200 https://registry.npmjs.org/rspack 167ms (cache revalidated)
15 verbose stack Error: could not determine executable to run
15 verbose stack     at getBinFromManifest (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
15 verbose stack     at exec (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
15 verbose stack     at async Npm.exec (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/lib/npm.js:207:9)
15 verbose stack     at async module.exports (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/lib/cli/entry.js:74:5)
16 verbose pkgid rspack@0.1.1
17 error could not determine executable to run
18 verbose cwd /Users/wreiske/Documents/GitHub/meteor-react-tailwind-prettier-starter
19 verbose os Darwin 24.5.0
20 verbose node v22.18.0
21 verbose npm  v10.9.3
22 verbose exit 1
23 verbose code 1
24 error A complete log of this run can be found in: /Users/wreiske/.npm/_logs/2025-09-09T22_20_19_163Z-debug-0.log
14 http fetch GET 200 https://registry.npmjs.org/rspack 196ms (cache revalidated)
15 verbose stack Error: could not determine executable to run
15 verbose stack     at getBinFromManifest (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/node_modules/libnpmexec/lib/get-bin-from-manifest.js:17:23)
15 verbose stack     at exec (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/node_modules/libnpmexec/lib/index.js:202:15)
15 verbose stack     at async Npm.exec (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/lib/npm.js:207:9)
15 verbose stack     at async module.exports (/Users/wreiske/.meteor/packages/meteor-tool/.3.4.0-beta.6.6mldn4xztdp++os.osx.arm64+web.browser+web.browser.legacy+web.cordova/mt-os.osx.arm64/dev_bundle/lib/node_modules/npm/lib/cli/entry.js:74:5)
16 verbose pkgid rspack@0.1.1
17 error could not determine executable to run
18 verbose cwd /Users/wreiske/Documents/GitHub/meteor-react-tailwind-prettier-starter
19 verbose os Darwin 24.5.0
20 verbose node v22.18.0
21 verbose npm  v10.9.3
22 verbose exit 1
23 verbose code 1
24 error A complete log of this run can be found in: /Users/wreiske/.npm/_logs/2025-09-09T22_20_19_163Z-debug-0.log

Did you do npm install? I think the reason is this. I’d like to improve the logs to warn about that, basically meaning that it can’t find the rspack .bin within node_modules, likely missing it due to need for its installation.

If it still happens, does this happens to you even after doing a meteor reset?

All of this looks great @nachocodoner ! I’m sure this will make Meteor 3 get more traction :slight_smile:

btw, I think that code inside isSimulation isn’t restricted to the client code, since it could also be run on the server when you connect a server to another meteor instance to calls remote methods

1 Like

Thanks @tcastelli! Meteor needs modernization and a fresh view these days. :rocket:

btw, I think that code inside isSimulation isn’t restricted to the client code, since it could also be run on the server when you connect a server to another meteor instance to calls remote methods

You’re right. I probably won’t use this.isSimulation the way I was thinking and strip from server, since it’s a runtime check, not a build-time one like Meteor.isClient and Meteor.isServer. Safer not to assume based on that.

What I don’t understand is why meteor-vite didn’t mix the client code with the server-only code, did it inject a Node polyfill?

@jorgenvatle should be able to answer.