Migration

If your Next.js app is already deployed to another platform or using another open-source framework, you'd want to take a look here:

From OpenNext V2

If you used all the default configurations, you should be able to deploy your app without any changes.

OpenNext V3 replaced all the build args with a custom config file.

Here are the old build args and their new equivalent:

  • --build-command : buildCommand inside the config file.
  • --app-path: appPath inside the config file.
  • --build-output-path: buildOutputPath inside the config file.
  • --package-json-path: packageJsonPath inside the config file.
  • --minify: minify options inside each function property. This is enabled on a per function basis now.
  • --streaming: This is dependent on the wrapper you're using on a per function basis. To enable streaming in aws lambda, you can set wrapper: 'aws-lambda-streaming' in the override property of the function. Please note that AWS lambda streaming still suffer from buffering issue from the runtime itself. See here for more info.
  • --dangerously-disable-dynamodb-cache: dangerous.disableTagCache inside the config file.
  • --dangerously-disable-incremental-cache: dangerous.disableIncrementalCache inside the config file.

Vercel

Everything should already be set up for you. But there are a few things you should know:

  • Streaming by default is disabled in open-next (for now). It is very experimental right now see here for more info.
  • Middleware is not run for static file and for image requests with open-next.

AWS Amplify

TODO

Netlify

TODO

serverless-nextjs

You should remove some stuff from your next.config.js file, otherwise you'll get a build error.:

module.exports = {
  // ...
  target: 'serverless', // remove this
  // ...
}