如何将bootstrap 4升级到bootstrap 5? - 纱线

How to upgrade bootstrap 4 to bootstrap 5? - YARN

如何将使用 Yarn 安装的 Bootstrap 4 升级到 Bootstrap 5?

yarn upgrade命令有一个--latest开关:

The upgrade --latest command upgrades packages the same as the upgrade command, but ignores the version range specified in package.json. Instead, the version specified by the latest tag will be used (potentially upgrading the packages across major versions).

换句话说,

yarn upgrade bootstrap --latest

会将 bootstrap 软件包的版本升级到可用的最新版本。