HomeToolsAbout a20k

Amplify

Build from subfolder

Building from subfolder (from Amplify's perspective) is same as a Monorepo

Below code would build from /frontend/*

version: 1 applications: - appRoot: frontend frontend: phases: preBuild: commands: - yarn install --frozen-lockfile build: commands: - yarn run build artifacts: baseDirectory: .next files: - '**/*' cache: paths: - .next/cache/**/* - node_modules/**/*

Environment variable AMPLIFY_MONOREPO_APP_ROOT must also be added to the Environment Variables

© VincentVanKoh