{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true,
"types": ["uni-app", "html5plus"]
},
"include": ["./src/**/*"],
"files": ["main.ts"]
}
只需要在项目根目录随便创建一个空白的.ts
文件, 然后在tsconfig.json
添加files
键即可, 如上面配置