Weekly Update, April 16, 2025 – Faster Bundle Times with 3.3-beta.0! 🚀

@nachocodoner

Feel free to send me full logs using the METEOR_DEBUG_SQL=1 meteor profile command for your apps.

Make sure to add the following under the meteor key in your package.json. I enabled verbosity to get full details on your app’s behavior.

"meteor": {
  "modernWebArchsOnly": true,
  "modernTranspiler": {
     "verbose": true
  }
}

I added METEOR_DEBUG_SQL=1 because I noticed some SQL queries in published versions take longer or run distinctly, and this info helps with upcoming fixes. This may change the results slightly, so you can try again later without METEOR_DEBUG_SQL=1.

I’ve already received some feedback and found a few areas to adjust based on the variety of project setups, so this is useful.

You can send the logs privately via the forums or to my email: nacho@meteor.com. Please include your forum username so I can reply. You can also message me privately on the forums or Discord for a chat-like conversation on specific issues you get.

Make sure to review the profiles sensitive information first and remove it if exists. :rofl:

Interesting, why I don’t have -- Notice -- part likes yours?

@minhna I am really sorry to hear that. I can copy and paste it in a file for you to have it too :)))).

Ok, let’s see. As advised by @nachocodoner I was not supposed to see that.

Maybe related to how I installed Meteor on this M1. I have it installed the “old way” with the curl command and not with npx.

Then how do I know if it uses SWC or Babel?

I added more details in the docs: Adapt your code to benefit from SWC. These are in the staging environment.

To enable it, add this to your package.json:

"meteor": {
  "modernTranspiler": {
	  "verbose": true
  }
}

You will see logs like these:

2 Likes

My app before and after enable modernWebArchsOnly

3 Likes

3.2.0 vs 3.3-beta.0 SWC off vs 3.3-beta.0 SWC on

5 Likes

I think the DO_NOT_TRACK flag also made it to this release. :smiley:
Good job, y’all!

2 Likes

We’ve wrapped up the latest performance improvements mentioned above. 3.3-beta.1 is coming soon, we’re just revisiting the docs, testing, addressing some feedback, and clearing up a few remaining issues.

We’ve received private profiles that helped us understand different setups and gather focused feedback. This has been really helpful to see how updates behave in various environments. Thanks to everyone who tested early. :pray:

Here’s a quick look at how the numbers shift from 3.2 and 3.3-beta.0 in the upcoming 3.3-beta.1.

Results are from fredmaiaarantes/simpletasks app on a specific machine, and using Meteor checkout

An issue in published Meteor version was also fixed, so using it when published should show more noticeable performance gains than checkout results above.

We are likely hitting already performance improvement limits on Meteor 3.3, or at least, we consider it sufficient for now. Meteor 3.4 will push those numbers down further, as more of the app’s code and dependencies processes, like watching, transpiling, compiling, and minifying, will be delegated to a modern bundler. That will allow Meteor concentrate on what matters: Atmosphere packages, dev server app, Mongo dev server, CLI, produce the final bundle and other specifics.

8 Likes

Published a new version of react-meteor-data. This time I bumped to a major 4.0.0-beta.0 since it includes a breaking change: useFind describes no deps by default #431. Changelog

meteor add react-meteor-data@4.0.0-beta.0

4 Likes

Curl installs can be less stable on M1 systems consider reinstalling Meteor via npx for smoother performance

1 Like

In my first job in tech, in 2000, we were running a full hotel on a Compaq computer. I learnt the concept which guided my entire career: “Never touch a running machine”.
My station now runs so well with Meteor and a local Mongo Server, I am reluctant to even change my OS from dark to light theme :).

I’m getting this error in my frontend application when I try to start my app after updating to Meteor 3.3 Beta 0. It seems like browser-policy-content package needs an update/fix.

Any idea?

[[[[[ ~/yourdnafamily/frontend ]]]]]          

=> Started proxy.                             
I20250425-10:24:11.489(-4)? error on boot.js /home/ferjep/yourdnafamily/frontend/.meteor/local/build/programs/server/packages/browser-policy-content.js:363
I20250425-10:24:11.494(-4)? await setDefaultPolicy();
I20250425-10:24:11.494(-4)? ^^^^^
I20250425-10:24:11.494(-4)? 
I20250425-10:24:11.494(-4)? SyntaxError: await is only valid in async functions and the top level bodies of modules
I20250425-10:24:11.494(-4)?     at new Script (node:vm:117:7)
I20250425-10:24:11.495(-4)?     at createScript (node:vm:269:10)
I20250425-10:24:11.495(-4)?     at Object.runInThisContext (node:vm:317:10)
I20250425-10:24:11.495(-4)?     at /tools/static-assets/server/boot.js:414:32
I20250425-10:24:11.495(-4)?     at /tools/static-assets/server/boot.js:502:11
I20250425-10:24:11.495(-4)?     at Function.run (/home/ferjep/yourdnafamily/frontend/.meteor/local/build/programs/server/tools/tool-env/profile.ts:651:14)
I20250425-10:24:11.495(-4)?     at startServerProcess (/tools/static-assets/server/boot.js:501:17)
I20250425-10:24:11.495(-4)?     at Object.<anonymous> (/tools/static-assets/server/boot.js:506:2)
I20250425-10:24:11.495(-4)?     at Object.<anonymous> (/tools/static-assets/server/boot.js:510:4)
I20250425-10:24:11.495(-4)?     at Module.<anonymous> (node:internal/modules/cjs/loader:1554:14)
I20250425-10:24:11.495(-4)?     at Module.Mp._compile (/tools/static-assets/server/runtime.js:78:21)
I20250425-10:24:11.495(-4)?     at Object.Module._extensions..js (/tools/static-assets/server/runtime.js:112:21)
I20250425-10:24:11.495(-4)?     at Module.<anonymous> (node:internal/modules/cjs/loader:1289:32)
I20250425-10:24:11.496(-4)?     at Module.Mp.load (/tools/static-assets/server/runtime.js:35:31)
I20250425-10:24:11.496(-4)?     at Function._load (node:internal/modules/cjs/loader:1108:12)
I20250425-10:24:11.496(-4)?     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
I20250425-10:24:11.496(-4)? /home/ferjep/yourdnafamily/frontend/.meteor/local/build/programs/server/packages/browser-policy-content.js:363
I20250425-10:24:11.496(-4)? await setDefaultPolicy();
I20250425-10:24:11.496(-4)? ^^^^^
I20250425-10:24:11.496(-4)? 
I20250425-10:24:11.496(-4)? SyntaxError: await is only valid in async functions and the top level bodies of modules
I20250425-10:24:11.496(-4)?     at new Script (node:vm:117:7)
I20250425-10:24:11.496(-4)?     at createScript (node:vm:269:10)
I20250425-10:24:11.496(-4)?     at Object.runInThisContext (node:vm:317:10)
I20250425-10:24:11.496(-4)?     at /tools/static-assets/server/boot.js:414:32
I20250425-10:24:11.496(-4)?     at /tools/static-assets/server/boot.js:502:11
I20250425-10:24:11.496(-4)?     at Function.run (/home/ferjep/yourdnafamily/frontend/.meteor/local/build/programs/server/tools/tool-env/profile.ts:651:14)
I20250425-10:24:11.497(-4)?     at startServerProcess (/tools/static-assets/server/boot.js:501:17)
I20250425-10:24:11.497(-4)?     at Object.<anonymous> (/tools/static-assets/server/boot.js:506:2)
I20250425-10:24:11.497(-4)?     at Object.<anonymous> (/tools/static-assets/server/boot.js:510:4)
I20250425-10:24:11.497(-4)?     at Module.<anonymous> (node:internal/modules/cjs/loader:1554:14)
I20250425-10:24:11.497(-4)?     at Module.Mp._compile (/tools/static-assets/server/runtime.js:78:21)
I20250425-10:24:11.497(-4)?     at Object.Module._extensions..js (/tools/static-assets/server/runtime.js:112:21)
I20250425-10:24:11.497(-4)?     at Module.<anonymous> (node:internal/modules/cjs/loader:1289:32)
I20250425-10:24:11.497(-4)?     at Module.Mp.load (/tools/static-assets/server/runtime.js:35:31)
I20250425-10:24:11.497(-4)?     at Function._load (node:internal/modules/cjs/loader:1108:12)
I20250425-10:24:11.497(-4)?     at TracingChannel.traceSync (node:diagnostics_channel:322:14)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.

Meteor configs

  "meteor": {
    "modernWebArchsOnly": true,
    "modernTranspiler": true,
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    }
  },

Mmm, seems like there’s an issue with top-level await in browser-policy-content package. Oddly, it doesn’t fall back to Babel automatically.

What happens if you try this config?

"meteor": {
    "modernWebArchsOnly": true,
    "modernTranspiler": {
       "excludePackages": ["browser-policy-content"]
    },
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    }
  },

This is just a quick test. I’ll check into it, it should support top-level await (TLA) since we keep reify on SWC compilation, and webapp package, which also uses TLA works well with SWC.


Update: I reproduced the issue and confirm the config above solves it.

However, I found the proper fix in SWC’s code transpilation. It will be included in the upcoming 3.3-beta.1. At that time, you could remove the “excludePackages” config.

Thanks for the report. These are essential for stable delivery. :pray:

4 Likes

[UPDATE]
SOLVED: Error when observing the cursor: TypeError: this.documents?.clear is not a function

4 Likes
1 Like

I’ve been using 3.3-beta.0 this weekend. The biggest thing that is annoying me during development is it doesn’t seem to know how to get to the code like the old bundler. Everything is anon both client and serverside.

  "meteor": {
    "modernWebArchsOnly": true,
    "modernTranspiler": true,
    "mainModule": {
      "client": "client/main.js",
      "server": "server/main.js"
    },
    "testModule": "tests/main.js"
  },

This also makes using debugger impossible.

Thanks for testing. This time it’s a common use case we haven’t test so much yet, debugging.

I believe the issue is related to how we link the source map data with the file metadata in SWC. I will review this use case, as it likely misses the proper configuration.

2 Likes