version: 1 applications: - frontend: phases: preBuild: commands: - nvm use $(cat .nvmrc) || nvm install $(cat .nvmrc) # --include=dev is required because the build needs PostCSS / # Tailwind plugins which live in devDependencies; without it, # NODE_ENV=production in the Amplify env causes npm to skip them. - npm ci --include=dev --cache .npm --prefer-offline build: commands: - npm run build artifacts: baseDirectory: .next files: - '**/*' cache: paths: - node_modules/**/* - .next/cache/**/* - .npm/**/*