{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            "@/*": ["src/*"]
        },
        "target": "ES6",
        "module": "commonjs",
        "allowSyntheticDefaultImports": true,
        "types": ["uni-app", "html5plus"]
    },
    "include": ["./src/**/*"],
    "files": ["main.ts"]
}

只需要在项目根目录随便创建一个空白的.ts文件, 然后在tsconfig.json添加files键即可, 如上面配置

发表评论
12345
555