Skip to content

Commit 8385e68

Browse files
committed
docs: add entry scanning logic component
1 parent ab7dd1c commit 8385e68

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:::tip Entry scanning logic
2+
- If `src/` itself meets entry criteria → Single-entry application
3+
- If `src/` does not meet criteria → Scan subdirectories under `src/` → Multi-entry application
4+
- In single-entry applications, the default entry name is `index`
5+
6+
:::
7+

packages/document/docs/en/guides/concept/entries.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,9 @@ Modern.js automatically scans directories to identify entries that meet the crit
7676
2. **Has an `App.[jt]sx?` file** → Self-controlled routing entry
7777
3. **Has an `entry.[jt]sx?` file** → Custom entry
7878
79-
:::tip Entry scanning logic
80-
- If `src/` itself meets entry criteria → Single-entry application
81-
- If `src/` does not meet criteria → Scan subdirectories under `src/` → Multi-entry application
82-
- In single-entry applications, the default entry name is `main`
79+
import EntryScanLogic from '@site-docs/components/entry-scan-logic.mdx';
8380
84-
:::
81+
<EntryScanLogic />
8582
8683
:::tip Custom scanning directory
8784
You can modify the directory for identifying entries through [source.entriesDir](/configure/app/source/entries-dir).
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
:::tip 入口扫描逻辑
2+
- 如果 `src/` 本身满足入口条件 → 单入口应用
3+
- 如果 `src/` 不满足条件 → 扫描 `src/` 下的子目录 → 多入口应用
4+
- 单入口应用中,默认入口名为 `index`
5+
6+
:::
7+

packages/document/docs/zh/guides/concept/entries.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,9 @@ Modern.js 会自动扫描目录,识别符合条件的入口。一个目录被
7676
2. **具有 `App.[jt]sx?` 文件** → 自控式路由入口
7777
3. **具有 `entry.[jt]sx?` 文件** → 自定义入口
7878

79-
:::tip 入口扫描逻辑
80-
- 如果 `src/` 本身满足入口条件 → 单入口应用
81-
- 如果 `src/` 不满足条件 → 扫描 `src/` 下的子目录 → 多入口应用
82-
- 单入口应用中,默认入口名为 `main`
83-
84-
:::
79+
import EntryScanLogic from '@site-docs/components/entry-scan-logic.mdx';
8580

81+
<EntryScanLogic />
8682

8783
:::tip 自定义扫描目录
8884
你可以通过 [source.entriesDir](/configure/app/source/entries-dir) 修改识别入口的目录。

0 commit comments

Comments
 (0)