> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# source.tsconfigPath

- **Type:** `string`
- **Default:** `'tsconfig.json'`

Configure a custom tsconfig.json file path to use, can be a relative or absolute path.

## Purpose

The `tsconfig.json` configuration file affects the following behaviors of Rsbuild:

- The `paths` field configures [Path aliases](/guide/advanced/alias.md).
- Sets the scope and rules for the [@rsbuild/plugin-type-check](https://github.com/rstackjs/rsbuild-plugin-type-check).

## Example

The value of `source.tsconfigPath` can be set to a relative or an absolute path. Relative path will be resolved relative to the project root directory.

- Relative path example:

```ts title="rsbuild.config.ts"
export default {
  source: {
    tsconfigPath: './tsconfig.custom.json',
  },
};
```

- Absolute path example:

```ts
import path from 'node:path';

export default {
  source: {
    tsconfigPath: path.join(__dirname, 'tsconfig.custom.json'),
  },
};
```
