source.include
- Type: RuleSetCondition[]
- Default value:
source.include is used to specify additional JavaScript files that need to be compiled. By default, the following files will be compiled:
- TypeScript and JSX files in any directory, with file extensions matching
.ts,.tsx,.jsx,.mts,.cts. - JavaScript files not in the
node_modulesdirectory, with file extensions matching.js,.mjs,.cjs.
Tip
Before Rsbuild version 1.4, the default value of source.include was:
The difference from the new version is that .js, .mjs, .cjs files only in the current directory will be compiled.
Info
该配置项的使用方式与 Rsbuild 完全一致。详细信息请参考 Rsbuild - source.include。