DEV Community

Discussion on: Deploy a Next.js App to AWS Amplify

Collapse
 
marcostreng profile image
Marco Streng • Edited

After some investigation I found out that I have to set webpack to version 4 in my next.config.js.
The latest Next.js uses webpack 5 as default which is not working with AWS Amplify Hosting right now.

Thread Thread
 
sohammondal profile image
Soham Mondal

Yes, you're right. Downgrading Next.js to v11.1.3 and setting webpack5: false in next.config.js fixed the issue.

Some comments have been hidden by the post's author - find out more