fix: enable Next.js static export for GitHub Pages - #10
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 16edb481a2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| const nextConfig: NextConfig = { | ||
| /* config options here */ | ||
| output: "export", |
There was a problem hiding this comment.
Serve the exported
out directory instead
In the Docker deployment path I checked (docker-compose.yml builds frontend/Dockerfile), the container still runs CMD ["npm", "start"], and npm start maps to next start. Next's own error catalog says "next start" does not work with "output: export" configuration. Use "npx serve@latest out" instead., so any container started from this image will fail after this config change unless the Dockerfile/start command is updated to serve the generated out directory or this output mode is made conditional.
Useful? React with 👍 / 👎.
Adds \output: 'export'\ to next.config.ts so the site can be deployed to GitHub Pages or any static host.