UNPKG

743 BMarkdownView Raw
1### A base TSConfig for working with Node 12.
2
3Add the package to your `"devDependencies"`:
4
5```sh
6npm install --save-dev @tsconfig/node12
7yarn add --dev @tsconfig/node12
8```
9
10Add to your `tsconfig.json`:
11
12```json
13"extends": "@tsconfig/node12/tsconfig.json"
14```
15
16---
17
18The `tsconfig.json`:
19
20```jsonc
21{
22 "$schema": "https://json.schemastore.org/tsconfig",
23 "_version": "12.1.0",
24
25 "compilerOptions": {
26 "lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
27 "module": "node16",
28 "target": "es2019",
29
30 "strict": true,
31 "esModuleInterop": true,
32 "skipLibCheck": true,
33 "moduleResolution": "node16"
34 }
35}
36
37```
38
39You can find the [code here](https://github.com/tsconfig/bases/blob/master/bases/node12.json).