MorJS tsconfig.json 配置

2024-01-24 09:34 更新
基礎(chǔ) tsconfig.base.json 配置
{
  "compilerOptions": {
    "declaration": true,
    "target": "ES2019",
    "importHelpers": true,
    "moduleResolution": "Node",
    "sourceMap": true,
    "noImplicitOverride": true,
    "noUnusedLocals": true,
    "esModuleInterop": true,
    "lib": ["ES6", "ESNext", "DOM"]
  }
}

運行時 tsconfig.json 配置

{
  "extends": "../../tsconfig.base.json",
  "compilerOptions": {
    "target": "ES5",
    "rootDir": "./src",
    "outDir": "./lib",
    "module": "CommonJS",
    "skipLibCheck": true,
    "typeRoots": ["./node_modules/@types/"]
  },
  "include": ["./src"]
}

編譯時 tsconfig.json 配置

{

  "extends": "../../tsconfig.base.json",

  "compilerOptions": {

    "rootDir": "./src",

    "outDir": "./lib",

    "module": "CommonJS",

    "typeRoots": ["./node_modules/@types/"]

  },

  "include": ["src"]

}


以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號