【问题标题】:Change folder of "next export"更改“下一个导出”的文件夹
【发布时间】:2020-02-26 12:14:03
【问题描述】:

我已经关注 next.config.js

module.exports = {
  dir: "src",
  outDir: "./build"
};

当我运行next build; next export; 时,我的静态文件最终位于新创建的out 文件夹中。

我认为outDir 会覆盖它,但显然不是。那么有没有办法告诉下一个输出静态文件到build文件夹而不是out

【问题讨论】:

    标签: reactjs next.js


    【解决方案1】:

    来自docs

    out/ 目录的绝对路径(可使用 -o 或 --outdir 配置

    你可以运行:

    next export -o build/
    

    将构建重定向到build 目录。

    【讨论】:

    猜你喜欢
    • 2013-06-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多