tools.tsChecker
- Type:
Object | Function - Default:
By default, the @rsbuild/plugin-type-check is enabled for type checking. You can use output.disableTsChecker config to disable it.
Example
When the value of tsChecker is of type Object, it will be deeply merged with the default configuration.
Please refer to @rsbuild/plugin-type-check for more details.
TypeScript Go Support
tools.tsChecker supports enabling TypeScript Go for type checking. This experimental capability is provided by ts-checker-rspack-plugin, which is integrated by @rsbuild/plugin-type-check, and can reduce type-checking time by about 5-10x.
Before using it, install @typescript/native-preview:
Then set typescript.tsgo to true:
When tsgo is enabled, the default typescript.typescriptPath resolves to @typescript/native-preview/package.json. If you manually set typescript.typescriptPath, it must be an absolute path to @typescript/native-preview/package.json.
For supported options and limitations, please refer to ts-checker-rspack-plugin - TypeScript Go support.