@vbetsch/config-tsconfig
v1.0.4
Published
My tsconfig configuration files
Readme
@vbetsch/config-tsconfig
A collection of modular and extensible TSConfig files for TypeScript projects, providing a solid foundation for development and production builds.
🧩 Modules
This package provides several configuration modules that can be composed to fit your project's needs:
| Module | Description |
|-----------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
| base | Core TypeScript configuration for modern environments. |
| jsx | Specialized settings for React and JSX projects. |
| strict | Opinionated settings for maximum type safety and rigor. |
| build/base | Base configuration dedicated to the build process. |
| build/lib | Optimized settings for building TypeScript libraries. |
🏗️ Installation
We recommend using Node version lts/krypton -> v24.14.1.
Install the NPM package in your project:
npm install -D @vbetsch/config-tsconfigNote: Depending on the modules you use (e.g. jsx), you must also install the corresponding peer dependencies like @types/react.
- base:
- No more dependencies needed
- jsx:
- @types/react
- strict:
- No more dependencies needed
- build/base:
- No more dependencies needed
- build/lib:
- No more dependencies needed
🚀 Getting started
To use these configurations, extend them in your tsconfig.json file:
{
"extends": [
"@vbetsch/config-tsconfig/base",
"@vbetsch/config-tsconfig/strict"
]
}Using Build configurations
For your production builds, you can create a tsconfig.build.json and extend the build-specific modules.
You have to define outDir in your tsconfig.build.json.
If you modify your tsconfig build file after build your application in local, you have to think to delete your out
directory if exist.
{
"extends": [
"./tsconfig.json",
"@vbetsch/config-tsconfig/build/base",
"@vbetsch/config-tsconfig/build/lib"
],
"compilerOptions": {
// IMPORTANT: You have to define it !
"outDir": "./dist/"
}
}Check out the vbetsch/lib-config-ts-test repository for a live integration example.
🤝 Contributing
Please refer to the Root README for contribution guidelines.
