tsconfig.json Generator
Build a tsconfig.json from a stack preset, with every compiler option explained.
- Presets set sensible defaults — every option stays editable afterwards.
- include is set to src; adjust it to match your project layout.
Runs in your browser. Nothing you open or type here is uploaded.
How to use
- Pick a preset: React (Vite), Node.js or Library.
- Set the output directory and switch compiler options on or off. Each option carries a short explanation.
- Copy the generated tsconfig.json, or download it, into your project root.
Details
tsconfig.json tells the TypeScript compiler which files to compile, how strict the type checking is, and what JavaScript to emit. The file has over a hundred possible options, so this tool starts from a preset for your stack and exposes the ones that matter most: target, module and moduleResolution, jsx, strict checking, declaration output and source maps. Every option stays editable after you pick a preset, and the output updates as you change them. The include field is set to src; adjust it to match your project layout.
- Keep strict on. All presets enable it: it catches null errors and implicit any at compile time instead of at runtime.
- Use the bundler moduleResolution with Vite, webpack or esbuild. Use node or nodenext for plain Node.js projects, where there is no bundler to match.
- skipLibCheck speeds up builds by not type-checking the declaration files of your dependencies. It does not weaken checking of your own code.
Common questions
What is tsconfig.json?
It is the configuration file for the TypeScript compiler: it controls which files are compiled, how strict the type checking is, and what JavaScript the code is compiled down to.
Should I enable strict mode?
Yes, for almost every project. Strict mode catches whole classes of bugs (null errors, implicit any) at compile time. All presets here enable it by default.
bundler vs node moduleResolution?
Use bundler with Vite, webpack or esbuild — it matches how bundlers resolve imports. Use node (or nodenext) for plain Node.js projects without a bundler.