nuxt / nuxt/nuxt.com

Improve setup steps on deploying Nuxt app to AWS Amplify on docs

Open
#1,439 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
TypeScript
Stars
457
Forks
272
Avg merge
13h 33m
Merged PRs (30d)
23

Description

Affected page

https://nuxt.com/deploy/aws-amplify

Description

The documentation states that the integration of a Nuxt 3 app with AWS Amplify requires zero configuration. But that is not the case and I'll explain why.

The default build config that AWS Amplify generates is this:

version: 1
frontend:
  phases:
    preBuild:
      commands:
        - nvm use 18
        - corepack enable
        - npx --yes nypm i
    build:
      commands:
        - yarn run build
  artifacts:
    baseDirectory: .amplify-hosting
    files:
      - '**/*'

However, Nuxt's build (and generate) command generates an .output directory that contains the app's contents ready to be served.

Hence, the baseDirectory property in Amplify's build config will need to be updated to .output/public. Hence, Nuxt's integration with AWS Amplify isn't zero config.

Happy to open a PR.

P.S: Nitro's docs might be misleading as well.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the affected Nuxt AWS Amplify documentation page and compare its zero-configuration guidance with the provided Amplify build configuration. Verify the required output directory and update the setup steps so they accurately describe deployment; done when the rendered page no longer claims zero configuration and reflects the working base directory.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, typescript
Domain
cloud, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.