Meteor 3.3.1 Now Available: MongoDB Upgraded, Cordova 14, and Build Fixes

Meteor 3.3.1 is now available and recommended!

This release focuses on catching up on pending work around the MongoDB driver upgrade, adding Cordova 14 support to help migrate your apps to Android SDK 35, and refining the new build stack based on your feedback.

:paperclip: Meteor 3.3.1 full changelog

Hands on

To start using Meteor 3.3.1.

Update Your App

# Update your existing Meteor app to version 3.3.1
meteor update --release 3.3.1

Create a New App

# Create a new Meteor app using Meteor 3.3.1
meteor create my-app --release 3.3.1

Highlights

MongoDB Driver Upgrade

Before Meteor 3.3, we had already prepared a Mongo driver upgrade, including fixes we contributed that directly affected Meteor. However, we found a breaking change in some apps and decided to hold the update until we could address the issue.

MongoDB 3.6 is not supported beyond driver version 6.9.0. To avoid problems for projects still using it, we’ve created a new package:

meteor add npm-mongo-legacy

This pins the driver to 6.9.0 for compatibility.

Don’t add this package if you’re using MongoDB 4 or newer. The new driver 6.16.0 will be used automatically.

Keep in mind that older MongoDB versions won’t receive updates. We recommend migrating to MongoDB 5 or later, as the upcoming driver 6.17.0 will drop support for version 4. We’ll continue maintaining npm-mongo-legacy so you can still receive Meteor updates.

Cordova Upgrade

As every year around this time, Android now requires native apps to target a new minimum SDK version, this time API 35 and above. To comply, the Cordova platform bundled with Meteor has been updated to version 14.

See the Cordova 14 Changelog for details and migration steps.

Modern Build Stack

Meteor 3.3.1 release focuses on addressing your feedback on the new modern build stack introduced in Meteor 3.3. Thanks to your reports and reproduction steps, we’ve fixed several edge cases, including support for @swc/helpers to lean the bundles, cache invalidation issues and improvements to the meteor profile command.

To help reduce your bundle size when using SWC, run in your Meteor project:

meteor npm install --save @swc/helpers

This ensures the modern build stack using SWC externalizes common helpers, avoiding duplication and reducing overhead. This is only needed if you’re using the modern build stack.


If you’re interested in adopting the new modern build stack and get 3x faster build times, here’s how to migrate:

Add this to your package.json to enable the modern build stack:

"meteor": {
  "modern": true
}

Check the docs for help with the SWC migration, especially if your project uses multiple Babel plugins:

:paperclip: Modern Transpiler: SWC docs

If you find any issues, please report them to the Meteor issues tracker.

Big up contributors

We want to highlight how important community members contributions have been in delivering these changes.

Thanks to our core contributors: @nachocodoner, @italojs, @StorytellerCZ, @JorgenVatle, @welkinwong and @Saksham-Goel1107

Join us and contribute! Check out Meteor GitHub issues or start with Good first issues.

What’s Next?

9 Likes

As a side note, if you hit problems on 3.3.1 and want to downgrade to 3.3, pin babel-compiler to 7.12.0 in .meteor/versions. The eager 7.12.1 update introduced a mistaken change that requires the 3.3.1 tool.

To ensure more stability, we’re close to releasing patch 3.3.2. It will include improvements to the recent Mongo driver upgrade and support for legacy adopters. We’ll also fix several long-pending issues from the GitHub tracker.

Want a fix in 3.3.2? Open your PRs now so we have time to include them, or ensure issues have reproduction repository to proper planning and fixing.


We’re also working on releasing Meteor 2.16.2 to add support for Cordova 14. For now you can use a Meteor checkout to publish your Meteor 2.x apps to the Android Store and meet the new SDK 35 requirement. Stay tuned for the official 2.16.2 release.

2 Likes

I have this in my package.json:

  "meteor": {
    "modern": {
      "transpiler": {
        "verbose": false
      }
    }
  },

Should I replace that with:

"meteor": {
  "modern": true
}

Why 3.3.2? Not just straight into 3.4?

Meteor 3.3.2 will give us more room for fixes and regressions, as a straight release. Some issues were mistakenly introduced in 3.3.1, like

We have others that will be available in a faster release cycle.

Meteor 3.4 will require several betas; not sure how many. We haven’t had the first beta yet, so the time frame to an official/recommended 3.4 release is uncertain and likely longer. Keeping the 3.3.x series gives us time to introduce fixes and act on possible regressions or critical updates, while we prepare and deliver 3.4 betas in parallel.

Oh I see you’ll continue shipping bug fixes under 3.3.x while mainstream features that require multiple betas under 3.4 both in parallel

Sounds phenomenal, thank you and the core team for the efforts.

4 Likes

Awesome stuff! Praying for Capacitor and Electron integration (or an update to meteor-desktop) as I have apps that I haven’t been able to push updates to in years.

2 Likes

Hmm… if I set modern == true, I will lose the transpiler setting. Is there a new config option so as to keep both?

"meteor": {
  "modern": true
}

With this configuration, you enable all improvements from the modern build stack in your Meteor app.

By default all Meteor Bundler optimziations are enabled with modern:true including transpiler, minifier, watcher and so on. You can only disable if you specifically set false to any of these, like “meteor.modern.transpiler=false”.

Would something like this be correct?

"meteor": {
  "modern": true,
  "modern.transpiler.verbose": false,
}

No, I wrote a simplification of the code. You can either do:

"meteor": {
  "modern": true
}

or

"meteor": {
  "modern": {
      "transpiler": {
         "verbose": false
      }
  }
}
1 Like

Not praying as we’re running the latest ElectronJS version:

“electron”: “^37.2.6”,

without any problems. That being said, I know others have problems and the dependabot has listed a huge list of outdated versions that have many security problems on top of those that ElectronJS (including up to the previous version of 37.2.5) has.

If we switch to Capacitor or continue with ElectronJS, it doesn’t really matter much when the packages itself aren’t kept up-to-date and security risks are introduced.

but it only works on Meteor 2 right?

I recently got it running on 2.16, still having issues with build, hoping I can resolve that somehow

No, we’re on the latest Meteor version 3.3.1

Hmmm I just tried a fresh meteor create --blaze, then ran the setup steps from the repo, but was not able to get it to run. May be similar issue to this ticket.

ERROR  electronApp:  error while transpiling or minifying:  TypeError: api.caller is not a function

That error isn’t stopping the app from working, see our log:

INFO  electronApp:  transpiling and uglifying
ERROR  electronApp:  error while transpiling or minifying:  TypeError: api.caller is not a function
    at builder (/Users/andreaswest/Documents/workspace/frontend/node_modules/@babel/preset-env/src/index.ts:398:13)
    at /Users/andreaswest/Documents/workspace/frontend/node_modules/@babel/helper-plugin-utils/src/index.ts:62:12
    at ElectronApp.transpileAndMinify (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/lib/electronApp.js:854:33)
    at ElectronApp.build (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/lib/electronApp.js:451:24)
    at MeteorDesktop.run (/Users/andreaswest/Documents/workspace/frontend/node_modules/@meteor-community/meteor-desktop/lib/index.js:123:9)
INFO  electronApp:  packing .desktop to asar
VERBOSE  electronApp:  clearing temporary .desktop
INFO  meteorApp:  checking for any mobile platform
INFO  meteorApp:  building meteor app
DEBUG  meteorApp:  clearing build dir
INFO  meteorApp:  acquiring index.html
INFO  meteorApp:  successfully downloaded index.html from running meteor app
VERBOSE  meteorApp:  copying mobile build
INFO  meteorApp:  acquiring manifest.json
INFO  meteorApp:  successfully downloaded manifest.json from running meteor app
INFO  meteorApp:  mobile build copied to electron app
DEBUG  meteorApp:  copy cordova.js to meteor build
INFO  meteorApp:  injecting isDesktop
INFO  meteorApp:  injected successfully
INFO  meteorApp:  packing meteor app to asar archive
VERBOSE  meteorApp:  clearing meteor app after packing
INFO  meteorApp:  meteor build finished
INFO  electronApp:  running
info: [main] app data dir is: /Users/andreaswest/Library/Application Support/yourDNA.family
info: [main] initial desktop version is  03ee0dd9296c61f01949334297dea47b6ef1c8a1_dev
info: [main] will use desktop.asar from initial version because the initial version of meteor app has changed: /Users/andreaswest/Documents/workspace/frontend/.meteor/desktop-build/desktop.asar
debug: [main] skeleton version 4.0.0-rc.0

Please note that we didn’t start with a fresh setup but rather converting our existing Meteor ElectronJS app to work with both Meteor 3.x and then also with the newest ElectronJS version.

well basically, it does not run on a fresh setup nor on Meteor 3 :\ effectively killing my old app haha. I would pay if someone could fix that package up and get it working reliably

If now all the latest versions are about bundling, then maybe add dynamic imports for cordova to the roadmap.
Now web.cordova build bundle all in one js file:

But for web.browser add dynamic imports:

For example my bundled js file size 23Mb:

But for web.browser 7.4Mb. Cordova app startup time for 23Mb is very long! Don’t get it why cordova don’t bundle dynamic import, while meteor cordova plugin run full http server to serve app assets.

1 Like

This is one of the positive effects we expect from the upcoming Meteor-Rspack integration. Why? Dynamic imports in modern bundlers like Rspack output split code as files in the public folder, and that folder is included in the Cordova context. This lets a Cordova build preserve the main file and the split chunks from dynamic imports, so they load and run as expected in any browser-like context, as native Webview.

Adding Meteor’s DDP dynamic imports to Cordova, like other features modern bundlers already provide, would be duplicated work and research that may not be worth it or within our capacity. A better approach, given our means, is to embrace modern tools and standards, and then measure the impact soon.

2 Likes