Sponsor
ChatHubChatHub Use GPT-4, Gemini, Claude 3.5 and more chatbots side-by-side
ここをクリック
Menu

distDir

デフォルトの .next の代わりに、カスタムビルドディレクトリに使用する名前を指定できます。

next.config.js を開き、distDir 設定を追加します:

next.config.js
module.exports = {
  distDir: 'build',
}

next build を実行すると、Next.jsはデフォルトの .next フォルダーの代わりに build を使用します。

distDir はプロジェクトディレクトリから出ないようにする必要があります。例えば、../build無効なディレクトリです。