---
title: disableEntryDirs
---

# source.disableEntryDirs

- **Type:** `string[]`
- **Default:** `[]`

By default, Modern.js identifies the application entry point based on the `src` directory. You can use this option to prevent some directories from being recognized as application entry points.

For example, with the following configuration and directory structure:

```ts title="modern.config.ts"
export default defineConfig({
  source: {
    disableEntryDirs: ['./src/one'],
  },
});
```

```bash title="Project directory structure"
└── src/
    ├── one/
    |    └── App.tsx
    ├── two/
    |    └── routes/
    └── env.d.ts
```

Without setting this configuration option, Modern.js will produce two entries based on the project directory:

- one
- two

After setting this configuration option, the `src/one` directory will not be recognized as an entry directory.

A common use case is to configure the `src/common` and `src/components` directories in this option to prevent them from being recognized as application entry points.
