Before Next.js 9, when you ran
next build, server/serverless bundles would be created along with the client bundles. Then if you wanted to create static HTML versions of your pages you would need to run
This could be sub-optimal if you need both dynamic and static pages. Since Next.js 9,
next build comes with Automatic Static Optimization which can decide the build output per page, allowing your app to leverage static files and lambdas in the same app.
Before getting started, make sure you are using Next.js 9 or newer.