For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt, and this page is available as Markdown at /zh/configure/app/output/temp-dir.md.
  • 简体中文
  • output.tempDir

    • 类型: string
    • 默认值: ''

    项目开发或构建时,Modern.js 会生成真实的 Rspack 入口和 HTML 模板,并放在临时目录下。

    如果希望由多个配置同时启动某项目,可以通过该配置,将文件生成到不同的临时目录下,避免相互干扰。配置可以是相对路径或绝对路径,但应避免项目外的路径。

    示例

    export default {
      output: {
        tempDir: path.join('node_modules', '.temp-dir'),
      },
    };