Migrating to Meteor 2.7

How to migrate your application to Meteor 2.7.

Meteor 2.7 introduce the new accounts-2fa package, support for TailwindCSS 3.x, and built-in support for PostCSS in standard-minifier-css. For a complete breakdown of the changes, please refer to the changelog.

The above being said, there are a few items that you should do to have the latest CSS minifier in your project.

Update meteor-node-stubs

As we added support for node: imports, you need to update meteor-node-stubs to version 1.2.1:

meteor npm install meteor-node-stubs@1.2.1

Support for PostCSS

Starting from this version of Meteor (and 1.8.0 of standard-minifier-css), Meteor will run PostCSS plugins if you have them configured. If you are using juliancwirko:postcss as your css minifier, it is recommended to migrate to using standard-minifier-css. For most apps, this will only requiring switching which minifier the app uses:

meteor remove juliancwirko:postcss
meteor add standard-minifier-css

There are two differences with juliancwirko:postcss:

  • The excludedPackages PostCSS option was renamed to excludedMeteorPackages
  • Files with the .import.css extension are not treated specially

Note: In beta.1 of Meteor 2.7 we had added a new core package minifier-css-postcss but later decided to unify everything inside standard-minifier-css. So you shouldn’t use minifier-css-postcss.

TailwindCSS 3.x

Improvements in Meteor 2.7 enables minifiers to support TailwindCSS 3.x. These minifiers have been updated and tested with TailwindCSS 3:

  • juliancwirko:postcss, starting with version 2.1.0
  • standard-minifier-css

If updating from an older version of TailwindCSS to version 3, please read the Tailwind Official migration guide to make sure you had applied the changes required by TailwindCSS itself.

Accounts 2FA

accounts-2fa is a new package that enables two-factor authentication for accounts-password and accounts-passwordless.

There are no required changes to your application in any case, but if you want to provide 2FA for your users, and you are already using accounts-password or accounts-passwordless you can start using the new functions provided from 2FA package, read more in the docs.

Migrating from a version older than 2.7?

If you’re migrating from a version of Meteor older than Meteor 2.7, there may be important considerations not listed in this guide. Please review the older migration guides for details:

Edit on GitHub
// search box