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/source/config-dir.md.
  • 简体中文
  • source.configDir

    • 类型: string
    • 默认值: './config'

    Modern.js 支持在 ./config 文件夹下放置一些文件自定义 HTML 模板、图标、静态资源等,具体可参考文件约定。

    通过该选项可以自定义配置文件的目录。

    例如,将资源文件目录调整为 resources 目录:

    modern.config.ts
    import { defineConfig } from '@modern-js/app-tools';
    
    export default defineConfig({
      source: {
        configDir: './resources',
      },
    });