Skip to content

Commit 7389dbc

Browse files
committed
docs: add tsconfig performance optimization example
1 parent 06b58a3 commit 7389dbc

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,16 @@ setting "generateTrace" compiler option. This is an instruction from [microsoft/
250250
This plugin delegates type checking to TypeScript, so overall performance is mostly determined by `tsc` itself.
251251

252252
If you need faster type checks, start by optimizing your TypeScript setup using the [official TypeScript performance guide](https://github.com/microsoft/TypeScript/wiki/Performance).
253+
254+
For example, properly configuring the `include` and `exclude` scopes in `tsconfig.json` can significantly reduce unnecessary type checking and improve TypeScript performance:
255+
256+
```json title="tsconfig.json"
257+
{
258+
"include": ["src"],
259+
"exclude": ["**/node_modules", "**/.*/"]
260+
}
261+
```
262+
253263
## Enabling incremental mode
254264

255265
TypeScript's "incremental" mode speeds up initial cold-start typechecks keeping an on-disk cache.

0 commit comments

Comments
 (0)