迁移到 Meteor 2.7
Meteor 2.7
引入了新的 accounts-2fa
包,支持 TailwindCSS 3.x,并在 standard-minifier-css
中内置了对 PostCSS 的支持。有关更改的完整细分,请参阅变更日志。
综上所述,您应该执行以下几个操作,以便在项目中使用最新的 CSS 压缩工具。
更新 meteor-node-stubs
由于我们添加了对node: 导入的支持,因此您需要将 meteor-node-stubs
更新到 1.2.1
版本
meteor npm install [email protected]
支持 PostCSS
从 Meteor 的此版本(以及 standard-minifier-css
的 1.8.0 版本)开始,如果已配置 PostCSS 插件,Meteor 将运行它们。如果您正在使用 juliancwirko:postcss
作为您的 CSS 压缩工具,建议您迁移到使用 standard-minifier-css
。对于大多数应用程序,这只需要切换应用程序使用的压缩工具即可。
meteor remove juliancwirko:postcss
meteor add standard-minifier-css
juliancwirko:postcss
有两个区别
- PostCSS 选项
excludedPackages
已重命名为excludedMeteorPackages
- 具有
.import.css
扩展名的文件不会被特殊对待
注意:在 Meteor 2.7 的 beta.1 版本中,我们添加了一个新的核心包
minifier-css-postcss
,但后来决定将所有内容统一到standard-minifier-css
中。因此,您不应使用minifier-css-postcss
。
TailwindCSS 3.x
Meteor 2.7 中的改进使压缩工具能够支持 TailwindCSS 3.x。这些压缩工具已更新并经过 TailwindCSS 3 的测试。
juliancwirko:postcss
,从2.1.0
版本开始standard-minifier-css
如果要从旧版本的 TailwindCSS 更新到 3.x 版本,请阅读Tailwind 官方迁移指南,以确保您已应用 TailwindCSS 本身所需的更改。
账户双因素认证
accounts-2fa
是一个新的包,它为 accounts-password
和 accounts-passwordless
启用双因素身份验证。
在任何情况下,您都不需要对应用程序进行任何更改,但如果您想为用户提供双因素认证,并且您已经在使用 accounts-password
或 accounts-passwordless
,则可以开始使用 2FA 包提供的新功能,在文档中了解更多信息。
从低于 2.7 的版本迁移?
如果您要从低于 Meteor 2.7 的版本迁移,则可能需要考虑本指南中未列出的重要事项。请查看旧版迁移指南以获取详细信息。
- 迁移到 Meteor 2.6(从 2.5 迁移)
- 迁移到 Meteor 2.5(从 2.4 迁移)
- 迁移到 Meteor 2.4(从 2.3 迁移)
- 迁移到 Meteor 2.3(从 2.2 迁移)
- 迁移到 Meteor 2.2(从 2.0 迁移)
- 迁移到 Meteor 2.0(从 1.12 迁移)
- 迁移到 Meteor 1.12(从 1.11 迁移)
- 迁移到 Meteor 1.11(从 1.10.2 迁移)
- 迁移到 Meteor 1.10.2(从 1.10 迁移)
- 迁移到 Meteor 1.10(从 1.9.3 迁移)
- 迁移到 Meteor 1.9.3(从 1.9 迁移)
- 迁移到 Meteor 1.9(从 1.8.3 迁移)
- 迁移到 Meteor 1.8.3(从 1.8.2 迁移)
- 迁移到 Meteor 1.8.2(从 1.8 迁移)
- 迁移到 Meteor 1.8(从 1.7 迁移)
- 迁移到 Meteor 1.7(从 1.6 迁移)
- 迁移到 Meteor 1.6(从 1.5 迁移)
- 迁移到 Meteor 1.5(从 1.4 迁移)
- 迁移到 Meteor 1.4(从 1.3 迁移)
- 迁移到 Meteor 1.3(从 1.2 迁移)