Skip to content

Commit ab0c3b2

Browse files
sapphi-redbluwy
andauthored
docs: clarify tsconfig resolution behavior (#21179)
Co-authored-by: Bjorn Lu <[email protected]>
1 parent 1480216 commit ab0c3b2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/guide/features.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ export type { T }
5353

5454
### TypeScript Compiler Options
5555

56+
Vite respects some of the options in `tsconfig.json` and sets the corresponding esbuild options. For each file, Vite uses the `tsconfig.json` in the closest parent directory. If that `tsconfig.json` contains a [`references`](https://www.typescriptlang.org/tsconfig/#references) field, Vite will use the referenced config file that satisfies the [`include`](https://www.typescriptlang.org/tsconfig/#include) and [`exclude`](https://www.typescriptlang.org/tsconfig/#exclude) fields.
57+
58+
When the options are set in both the Vite config and the `tsconfig.json`, the value in the Vite config takes precedence.
59+
5660
Some configuration fields under `compilerOptions` in `tsconfig.json` require special attention.
5761

5862
#### `isolatedModules`

0 commit comments

Comments
 (0)