Fix Next.js standalone build for Amplify WEB_COMPUTE
- Set output to standalone in next.config.js - Update build artifacts to use .next/standalone - Copy static files to standalone directory - Remove invalid serverActions config
This commit is contained in:
10
amplify.yml
10
amplify.yml
@@ -10,14 +10,12 @@ frontend:
|
||||
build:
|
||||
commands:
|
||||
- npm run build
|
||||
- cp -r public .next/standalone/
|
||||
- cp -r .next/static .next/standalone/.next/
|
||||
artifacts:
|
||||
baseDirectory: ./
|
||||
baseDirectory: .next/standalone
|
||||
files:
|
||||
- .next/**/*
|
||||
- node_modules/**/*
|
||||
- package.json
|
||||
- next.config.js
|
||||
- public/**/*
|
||||
- '**/*'
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/**/*
|
||||
|
||||
Reference in New Issue
Block a user