Skip to content

Commit e2186c5

Browse files
committed
docs: enhance entry exclude in bundleless mode
1 parent 4b1e0a4 commit e2186c5

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

website/docs/en/config/lib/bundle.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,20 @@ export default {
7373
};
7474
```
7575

76+
::: note
77+
78+
If [DTS generation](/config/lib/dts) is enabled, remember to set [exclude](https://www.typescriptlang.org/tsconfig/#exclude) field in `tsconfig.json` to avoid generating TypeScript declaration files for the corresponding files.
79+
80+
```json
81+
// tsconfig.json
82+
{
83+
"include": ["src"],
84+
"exclude": ["src/**/foo.*"]
85+
}
86+
```
87+
88+
:::
89+
7690
## Example
7791

7892
For below file structure of source code:

website/docs/zh/config/lib/bundle.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,20 @@ export default {
7171
};
7272
```
7373

74+
::: note
75+
76+
当开启 [类型生成](/config/lib/dts) 时,记得在 `tsconfig.json` 中设置 [exclude](https://www.typescriptlang.org/tsconfig/#exclude) 字段,以避免相应的文件生成 TypeScript 类型声明文件。
77+
78+
```json
79+
// tsconfig.json
80+
{
81+
"include": ["src"],
82+
"exclude": ["src/**/foo.*"]
83+
}
84+
```
85+
86+
:::
87+
7488
## Example
7589

7690
对于以下的源代码文件结构:

0 commit comments

Comments
 (0)