Preset: aws_amplify
You can configure advanced options of this preset using awsAmplify option.
import { defineNitroConfig } from "nitro/config";
export default defineNitroConfig({
awsAmplify: {
// catchAllStaticFallback: true,
// imageOptimization: { path: "/_image", cacheControl: "public, max-age=3600, immutable" },
// imageSettings: { ... },
// runtime: "nodejs18.x", // default: "nodejs18.x" | "nodejs16.x" | "nodejs20.x"
}
})
amplify.ymlYou might need a custom amplify.yml file for advanced configuration. Here are two template examples:
version: 1
frontend:
phases:
preBuild:
commands:
- nvm use 18 && node --version
- corepack enable && npx --yes nypm install
build:
commands:
- pnpm build
artifacts:
baseDirectory: .amplify-hosting
files:
- "**/*"
version: 1
applications:
- frontend:
phases:
preBuild:
commands:
- nvm use 18 && node --version
- corepack enable && npx --yes nypm install
build:
commands:
- pnpm --filter website1 build
artifacts:
baseDirectory: apps/website1/.amplify-hosting
files:
- '**/*'
buildPath: /
appRoot: apps/website1