Configuration
Custom build directory
distDir changes the build directory within the project. Adapt artifact-copy and cleanup steps to the configured path; never allow cleanup outside a disposable build root. This configuration is an example, not a filesystem sandbox. Source: https://nextjs.org/docs/pages/api-reference/config/next-config-js/distDir. Documentation-reviewed illustrative draft; installed declarations and runtime not verified.
Formal Syntax & Structure
nextjs syntaxnextjs
distDir: stringWorking Example
Example Snippetnextjs
export default {distDir:'build-output'}