-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtsconfig.json
29 lines (29 loc) · 1.33 KB
/
tsconfig.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{
"compilerOptions": {
"target": "esnext", // 设置ts代码编译的目标版本
"useDefineForClassFields": true,
"module": "esnext", // 设置编译后代码使用的模块化系统
"moduleResolution": "node",
"strict": true, // 启用所有的严格检查,总开关
"jsx": "preserve",
"sourceMap": true, // 是否生成sourceMap
"resolveJsonModule": true,
"esModuleInterop": true,
"lib": ["esnext", "dom"], // 指定代码运行时所包含的库(宿主环境)
"baseUrl": "./", // 解析非相对模块的基地址,默认是当前目录
"allowJs": true, // 是否对js文件编译
"paths": {
"@/*": ["src/*"]
},
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
"allowSyntheticDefaultImports": true /* 允许默认导入 */,
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
"types": ["element-plus/global", "vite-plugin-svg-icons/client"],
"typeRoots": [
"./node_modules/@types/",
"./types"
] /* 指定多个文件夹,这些文件夹的作用类似于 './node_modules/@types'. */
},
"include": ["src/**/*.ts", "src/**/*.vue", "types/**/*.d.ts"], // 定义希望被编译文件所在的目录
"exclude": ["node_modules", "dist", "**/*.js"] // 定义需要排除在外的目录
}