next.config.js 옵션: distDir
next.config.js 옵션: distDir | Next.js
섹션 제목: “next.config.js 옵션: distDir | Next.js”출처 URL: https://nextjs.org/docs/pages/api-reference/config/next-config-js/distDir
distDir
섹션 제목: “distDir”마지막 업데이트: 2026년 2월 20일
.next 대신 사용할 사용자 지정 빌드 디렉터리 이름을 지정할 수 있습니다.
next.config.js를 열어 distDir 설정을 추가하세요.
next.config.js
module.exports = { distDir: 'build', }이제 next build를 실행하면 Next.js가 기본 .next 폴더 대신 build를 사용합니다.
distDir은 프로젝트 디렉터리를 벗어나면 안 됩니다. 예를 들어../build는 유효하지 않은 디렉터리입니다.
보내기