Skip to content

Commit

Permalink
Updated Convert an SSR App to SSG (Due to NextJS latest version next …
Browse files Browse the repository at this point in the history
…export is not avaible)

- NextJS from v13.3.0 next export already deprecated, and has been removed from version v14.0.0 and replace by "output" : "export", so for now if using the current document approach, it will causing error when building	 

refer to this official document: https://nextjs.org/docs/pages/building-your-application/deploying/static-exports
  • Loading branch information
pvhuwung authored Jun 20, 2024
1 parent b73d554 commit 1f41a9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ frontend:
...
```

3. Update the build command in your package.json to use `next export`, then commit this to trigger a new non SSR build.
3. Update the build command in your `next.config.js` to add `output: 'export'` inside the `nextConfig` (`v14.0.0` **next export** has been **removed** in favor of **"output": "export"**), then commit this to trigger a new non SSR build.

4. Finally, go to the `Rewrites and redirects` tab in the Amplify Hosting, and delete the first rewrite rule that was re-writing to your SSR CloudFront Distribution.

Expand Down

0 comments on commit 1f41a9b

Please sign in to comment.