-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
35 lines (35 loc) · 1.38 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
"compilerOptions": {
"lib": ["DOM"],
"outDir": "./dist/",
"noImplicitAny": true,
"module": "ESNext",
"target": "es5",
"jsx": "react-jsx",
// позволяет обрабатывать так же js файлы
"allowJs": true,
"moduleResolution": "node",
// для абсолютного импорта
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
},
"strict": true,
// позволяет работтаь с пакетами которые использует common js, как с обычными пакетами с помощью import (require() module.export) = common js
// import Moment from 'moment'
// без флага - undefined
// с флагом - [object Object]
"esModuleInterop": true,
// Если библиотека не имеет default export
// лоадеры вроде ts-loader или babel-loader автоматически создают их
// вместо import * as React from 'react' => import react from 'react'
"allowSyntheticDefaultImports": true,
"isolatedModules": true
},
"ts-node": {
"compilerOptions": {
"module": "CommonJS"
}
},
"include": ["./config/jest/setupTests.ts", "./src/**/*.ts", "./src/**/*.tsx"]
}