在 monorepo 中设置 EAS Build
编辑页面
了解如何在 monorepo 中设置 EAS Build。
For the complete documentation index, see llms.txt. Use this file to discover all available pages.
要在 monorepo 中设置 EAS Build,你需要按照下面所述的标准流程进行:
- 从应用目录的根目录运行所有 EAS CLI 命令。例如,如果你的项目位于 git 仓库中的 apps/my-app,那么请在那里运行
eas build。 - 所有与 EAS Build 相关的文件,例如 eas.json 和 credentials.json,都应该放在应用目录的根目录中。如果你的 monorepo 中有多个使用 EAS Build 的应用,那么每个应用目录都会有自己的一份这些文件。
- 如果你正在 monorepo 中构建托管项目,请参见 使用 Monorepo 指南。
- 如果你的项目需要比现有内容更多的额外设置,请在项目中的 package.json 里添加一个
postinstall步骤,以构建其他工作区中所有必要的依赖项。例如:
package.json
{ "scripts": { "postinstall": "cd ../.. && yarn build" } }