1、在目录根目录添加tsconfig.json

  

{
  "compileOnSave": false,
  "compilerOptions": {
    // 文件目录
    "baseUrl": "./",
    // 输出目录,貌似不能和输入目录相同 555
    "outDir": "./js",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es5",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

2、配置 file watch

  webstorm 自动编译ts

 

  webstorm 自动编译ts

 

相关文章:

  • 2021-08-10
  • 2022-12-23
  • 2021-11-19
  • 2021-07-20
  • 2021-10-02
  • 2021-05-11
  • 2021-12-03
  • 2021-06-24
猜你喜欢
  • 2021-10-13
  • 2021-09-03
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2021-07-20
  • 2022-12-23
相关资源
相似解决方案