使用 monorepo 设置 EAS Build

了解如何使用 monorepo 设置 EAS Build。


要使用 monorepo 设置 EAS Build,你需要按照如下所述的标准流程进行操作:

🌐 To set up EAS Build with a monorepo, you need to follow the standard process as described below:

  • 在应用目录的根目录运行所有 EAS CLI 命令。例如,如果你的项目存在于 git 仓库中的 apps/my-app,那么就从那里运行 eas build
  • 所有与 EAS Build 相关的文件,例如 eas.jsoncredentials.json,都应位于应用目录的根目录中。如果你的 monorepo 中有多个使用 EAS Build 的应用,每个应用目录将有自己的这些文件副本。
  • 如果你正在单体仓库中构建托管项目,请参见使用单体仓库指南。
  • 如果你的项目需要超出提供内容的额外设置,请在项目的 package.json 中添加一个 postinstall 步骤,以构建其他工作区中的所有必要依赖。例如:
package.json
{ "scripts": { "postinstall": "cd ../.. && yarn build" } }