distDir
Source URL: https://nextjs.org/docs/pages/api-reference/config/next-config-js/distDir
distDir
Section titled “distDir”You can specify a name to use for a custom build directory to use instead of .next.
Open next.config.js and add the distDir config:
module.exports = { distDir: 'build',}Now if you run next build Next.js will use build instead of the default .next folder.
distDirshould not leave your project directory. For example,../buildis an invalid directory.