Skip to content

Latest commit

 

History

History
69 lines (52 loc) · 1.17 KB

README.zh_CN.md

File metadata and controls

69 lines (52 loc) · 1.17 KB

@tomjs/tsconfig

npm node-current (scoped) NPM

English | 中文

基于 @vue/tsconfigtsconfig,支持 node、vue、react 项目。

使用

安装依赖

pnpm add -D @tomjs/tsconfig

node 项目

修改 tsconfig.node.json 配置

{
  "extends": "@tomjs/tsconfig/node.json",
  "compilerOptions": {
    "composite": true
  },
  "include": []
}

vue 项目

修改 tsconfig.json 配置

  • vue.json: 通用配置
  • vue-dom.json: 宽松配置
{
  "extends": "@tomjs/tsconfig/vue.json",
  "compilerOptions": {},
  "include": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    }
  ]
}

react 项目

修改 tsconfig.json 配置

  • react.json: 通用配置
  • react-dom.json: 宽松配置
{
  "extends": "@tomjs/tsconfig/react.json",
  "compilerOptions": {},
  "include": [],
  "references": [
    {
      "path": "./tsconfig.node.json"
    }
  ]
}