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