主题
distDir
你可以指定用于自定义构建目录的名称,而不是 .next。
¥You can specify a name to use for a custom build directory to use instead of .next.
打开 next.config.js 并添加 distDir 配置:
¥Open next.config.js and add the distDir config:
现在,如果你运行 next build Next.js 将使用 build 而不是默认的 .next 文件夹。
¥Now if you run next build Next.js will use build instead of the default .next folder.
distDir不应离开你的项目目录。例如,../build是无效目录。¥
distDirshould not leave your project directory. For example,../buildis an invalid directory.