You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/en/config/lib/bundle.mdx
+18-2Lines changed: 18 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ export default {
55
55
};
56
56
```
57
57
58
-
You can also use with an exclamation mark to exclude some files.
58
+
You can also use with an exclamation mark to exclude some files. For example, exclude test files within the `src` folder:
59
59
60
60
```ts title="rslib.config.ts"
61
61
exportdefault {
@@ -67,12 +67,28 @@ export default {
67
67
],
68
68
source: {
69
69
entry: {
70
-
index: ['./src/**', '!**/foo.*'],
70
+
index: ['./src/**', '!src/**/*.test.ts'],
71
71
},
72
72
},
73
73
};
74
74
```
75
75
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
+
For example, exclude test files within the `src` folder:
0 commit comments