tsconfig.json ジェネレーター
TypeScriptプロジェクト用のtsconfig.jsonを生成します。フレームワークプリセットを選択するか、手動でオプションを設定できます。
{
"compilerOptions": {
"target": "ES2020",
"module": "CommonJS",
"moduleResolution": "Node",
"lib": [
"ESNext"
],
"outDir": "./dist",
"rootDir": "./src",
"strict": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true
},
"include": [
"src"
],
"exclude": [
"node_modules",
"dist"
]
}What Is the tsconfig.json Generator?
The tsconfig.json generator builds a complete TypeScript compiler configuration file based on your project type and preferences. Select a framework preset (React, Next.js, Node.js, or Deno) to auto-fill sensible defaults, then fine-tune compiler options like target, module, moduleResolution, strict mode, source maps, path aliases, and more. The output updates in real time and can be downloaded as tsconfig.json.
How to Use the tsconfig.json Generator
- Select a framework preset to apply defaults for your stack (e.g., Next.js, Node.js).
- Adjust compiler options — target, module system, and module resolution.
- Set output paths: outDir, rootDir, include, and exclude globs.
- Enable or disable strictness flags to match your project's requirements.
- Click Download to save the file, or Copy to paste it into your project.
Features
- Framework presets for React, Next.js, Node.js, Deno, and plain TypeScript
- Configurable target (ES5 through ESNext)
- Module and moduleResolution selection
- Strict mode and individual strictness flags
- Declaration, declarationMap, sourceMap, and removeComments toggles
- Paths alias (@/* → ./src/*) toggle
- Real-time JSON output with Download and Copy
FAQ
What is tsconfig.json?
tsconfig.json is the configuration file for the TypeScript compiler (tsc). It specifies the root files and compiler options required to compile a TypeScript project, including target JavaScript version, module system, type checking strictness, output paths, and more.
Should I enable strict mode?
Yes, for new projects. The strict flag enables a suite of type-checking options including noImplicitAny, strictNullChecks, strictFunctionTypes, and more. It catches more bugs at compile time. For large existing projects, you may need to enable it incrementally.
What moduleResolution should I use?
For projects using a bundler (Vite, Webpack, Next.js), use Bundler. For Node.js with ESM, use NodeNext. For classic Node.js (CommonJS), use Node. Bundler is the most permissive and works well with modern tooling.
What does skipLibCheck do?
skipLibCheck skips type checking of declaration files (*.d.ts). It speeds up compilation and avoids errors from third-party library type definitions. It is recommended for most projects.