TypeScript configuration (TSConfig)
npm install @openally/config.typescript
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
``bash`
$ npm i -D @openally/config.typescriptor
$ yarn add @openally/config.typescript -D
`json
{
"extends": "@openally/config.typescript/cjs",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
`
Use either cjs, esm or esm-ts-next
`json``
{
"exports": {
".": "./esm/tsconfig.json",
"./esm": "./esm/tsconfig.json",
"./esm-ts-next": "./esm-ts-next/tsconfig.json",
"./cjs": "./cjs/tsconfig.json"
}
}
> [!NOTE]
> The original inspiration for those configurations is The TSConfig Cheat Sheet
by Matt Pocock.