For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /configure/app/source/config-dir.md.

source.configDir

  • Type: string
  • Default: './config'

Modern.js supports placing some files in the ./config folder to customize HTML templates, icons, static assets, etc. For details, please refer to File Convention.

This option allows you to customize the directory of the configuration files.

For example, adjust the assets directory to the resources directory:

modern.config.ts
import { defineConfig } from '@modern-js/app-tools';

export default defineConfig({
  source: {
    configDir: './resources',
  },
});