> For AI agents: the complete documentation index is available at /zh/llms.txt, the full documentation bundle is available at /zh/llms-full.txt.

# source.disableDefaultEntries

- **类型：** `boolean`
- **默认值：** `false`

用于关闭基于目录结构来自动识别页面入口的功能。

:::info
默认情况下，Modern.js 会基于目录约定来自动确定页面的入口，具体可参考[入口](/zh/guides/concept/entries.md)。

:::

设置如下，即可关闭默认的行为：

```ts title="modern.config.ts"
export default defineConfig({
  source: {
    disableDefaultEntries: true,
  },
});
```

关闭默认行为后，你需要使用 [`source.entries`](/zh/configure/app/source/entries.md) 配置自定义的入口。

:::warning
我们推荐使用 Modern.js 提供的目录规范来组织代码，从而更好地使用框架功能，避免一些冗余的配置。

:::
