diff --git a/docs/guide/features.md b/docs/guide/features.md index c7caead35756f7..b8bb9c17ab2698 100644 --- a/docs/guide/features.md +++ b/docs/guide/features.md @@ -53,6 +53,10 @@ export type { T } ### TypeScript Compiler Options +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. + +When the options are set in both the Vite config and the `tsconfig.json`, the value in the Vite config takes precedence. + Some configuration fields under `compilerOptions` in `tsconfig.json` require special attention. #### `isolatedModules`