distDir
Last updated April 15, 2025
You can specify a name to use for a custom build directory to use instead of.next.
Opennext.config.js and add thedistDir config:
module.exports= { distDir:'build',}
Now if you runnext build Next.js will usebuild instead of the default.next folder.
distDirshould not leave your project directory. For example,../build is aninvalid directory.