OpenAlly TypeScript CJS & ESM configurations.
This package is available in the Node Package Repository and can be easily installed with npm or yarn.
$ npm i -D @openally/config.typescript
# or
$ yarn add @openally/config.typescript -D
{
"extends": "@openally/config.typescript/cjs",
"compilerOptions": {
"outDir": "dist",
"rootDir": "./src"
},
"include": ["src"],
"exclude": ["node_modules", "dist"]
}
Use either cjs or esm
{
"exports": {
"./esm": "./src/esm/tsconfig.json",
"./cjs": "./src/cjs/tsconfig.json"
}
}
Note
The original inspiration for those configurations is The TSConfig Cheat Sheet by Matt Pocock.
MIT