typescript config for tomjs
npm install @tomjs/tsconfig!npm !node-current (scoped) !NPM
English | 中文
> 基于 @vue/tsconfig 的 tsconfig,支持 node、vue、react 项目。
安装依赖
``bash`
pnpm add -D @tomjs/tsconfig
修改 tsconfig.node.json 配置
`json`
{
"extends": "@tomjs/tsconfig/node.json",
"compilerOptions": {
"composite": true
},
"include": []
}
修改 tsconfig.json 配置
- vue.json: 通用配置vue-dom.json
- : 宽松配置
`json`
{
"extends": "@tomjs/tsconfig/vue.json",
"compilerOptions": {},
"include": [],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}
修改 tsconfig.json 配置
- react.json: 通用配置react-dom.json
- : 宽松配置
`json``
{
"extends": "@tomjs/tsconfig/react.json",
"compilerOptions": {},
"include": [],
"references": [
{
"path": "./tsconfig.node.json"
}
]
}