DevBolt
Processed in your browser. Your data never leaves your device.

How do I build a tsconfig.json file online?

Choose a framework preset (Next.js, React/Vite, Node.js, or npm Library) and configure 35+ compiler options across strictness, emit, interop, and module resolution using visual controls. Each option includes an explanation. Download the generated tsconfig.json or copy it. Everything runs in your browser.

Build Next.js tsconfig
Input
Preset: Next.js App Router
Strict: yes
Target: ES2022
Output
{
  "compilerOptions": {
    "target": "ES2022",
    "lib": ["dom", "dom.iterable",
      "esnext"],
    "module": "esnext",
    "moduleResolution": "bundler",
    "strict": true,
    "jsx": "preserve",
    "plugins": [{ "name": "next" }],
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["next-env.d.ts",
    "**/*.ts", "**/*.tsx"]
}

tsconfig.json Visual Builder

Build your TypeScript configuration visually with explanations for every option. Start from a preset or customize from scratch.

Presets

target

Set the JavaScript language version for emitted output.

module

Specify what module code is generated.

moduleResolution

Strategy for resolving import specifiers.

lib

Library files to include in the compilation.

Enables: noImplicitAny, strictNullChecks, strictFunctionTypes, strictBindCallApply, strictPropertyInitialization, noImplicitThis, alwaysStrict, useUnknownInCatchVariables


Additional (not included in strict)

include
src
exclude
node_modules
tsconfig.json
{
  "compilerOptions": {
    "target": "ES2020",
    "module": "ESNext",
    "moduleResolution": "Bundler",
    "strict": true,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "skipLibCheck": true
  },
  "include": [
    "src"
  ],
  "exclude": [
    "node_modules"
  ]
}

7

Options set

ON

Strict mode

302

Bytes

Press Ctrl+Enter to copy

Tips & Best Practices

Pro Tip

Enable strict mode — it catches bugs that unit tests miss

strict: true enables strictNullChecks, noImplicitAny, strictFunctionTypes, and more. These catch null pointer errors, implicit any types, and function signature mismatches at compile time. Fixing strict mode errors in a new project is easy — retrofitting it into a large codebase is painful.

Common Pitfall

moduleResolution: 'node' is legacy — use 'bundler' for modern apps

moduleResolution: 'node' (Node10) follows Node.js's CommonJS resolution algorithm. For apps using Vite, Next.js, or any bundler, use 'bundler' which supports package.json exports, conditional imports, and ESM properly. 'nodenext' is for pure Node.js ESM projects.

Real-World Example

Use path aliases to eliminate ../../../ imports

Set baseUrl: '.' and paths: { '@/*': ['src/*'] } to enable import { Button } from '@/components/Button' instead of import { Button } from '../../../components/Button'. Most bundlers (Vite, Next.js, webpack) need matching aliases in their config.

Security Note

skipLibCheck: true hides vulnerabilities in dependencies

skipLibCheck skips type checking of .d.ts files, which includes node_modules type definitions. While this speeds up compilation, it means type-level bugs or incompatibilities in dependencies won't surface until runtime. In security-critical code, consider disabling skipLibCheck.

Frequently Asked Questions

How do I create a tsconfig.json for my project?
Select a framework preset (React, Next.js, Node.js, library, or vanilla TypeScript), then customize options using the visual editor. DevBolt organizes 35+ options into categories: strict type checking, module resolution, output settings, path aliases, and file inclusion. Each option shows a description of what it does and when to enable it. The generated tsconfig.json updates in real time and can be copied or downloaded.
What does enabling strict mode do in tsconfig.json?
The strict flag enables a collection of stricter type-checking options: strictNullChecks, strictFunctionTypes, strictBindCallApply, strictPropertyInitialization, noImplicitAny, noImplicitThis, useUnknownInCatchVariables, and alwaysStrict. Enabling strict is recommended for all new projects. It catches common bugs at compile time and forces explicit type handling rather than relying on unsafe implicit any types.
What is the difference between module and moduleResolution in tsconfig?
module controls the JavaScript module format TypeScript emits: commonjs emits require/module.exports, esnext emits import/export, nodenext emits Node.js native ESM. moduleResolution controls how TypeScript finds imported files: node (classic CommonJS resolution), node16/nodenext (ESM with package.json exports support), or bundler (modern bundler resolution). These are independent: you can emit ESM while using bundler resolution.

Related Generate Tools