@ttionya/tsconfig
v2.2.0
Published
Shared TypeScript config for my projects
Downloads
34
Maintainers
Readme
@ttionya/tsconfig
Shared TypeScript config for my projects.
Configure grouping by category, see full configuration options here.
Required
- NodeJS
>=18.12.0
- TypeScript
^5.0.0
IMPORTANT: This branch only supports Node 18 LTS or higher and TypeScript 5. Switch to the v1
branch that supports Node 14 LTS and TypeScript 4.7+.
Install
# NPM
npm i -D @ttionya/tsconfig
# PNPM
pnpm add -D @ttionya/tsconfig
Usage
Node (ESM)
Enabling ECMAScript Modules (ESM) by setting "type": "module"
in package.json
.
{
"extends": "@ttionya/tsconfig/tsconfig.esm.json",
"compilerOptions": {
"outDir": "./esm"
}
}
Node (CommonJS)
Using CommonJS and automatically detecting the appropriate algorithm to resolve modules. Supporting the exports
field in the package.json
file.
{
"extends": "@ttionya/tsconfig/tsconfig.commonjs.json",
"compilerOptions": {
"outDir": "./lib"
}
}
Node (Classic CommonJS)
Using CommonJS but not supporting the exports
field in the package.json
file.
{
"extends": "@ttionya/tsconfig/tsconfig.classic.json",
"compilerOptions": {
"outDir": "./lib"
}
}
License
MIT