-
Notifications
You must be signed in to change notification settings - Fork 0
/
tsconfig.json
68 lines (68 loc) · 1.78 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
"compilerOptions": {
"target": "ESNext", // target用于指定编译之后的版本目录
"jsx": "preserve", // 是否在表达式和声明上有隐含的any类型时报错
/**
TS需要引用的库,即声明文件,es5 默认引用dom、es5、scripthost,
如需要使用es的高级版本特性,通常都需要配置,如es8的数组新特性需要引入"ES2019.Array"
*
*/
"lib": [
"ESNext",
"DOM",
"DOM.Iterable"
],
"useDefineForClassFields": true,
"baseUrl": "./",
"module": "ESNext", // 指定生成代码的模板标准
"moduleResolution": "Bundler", // 模块解析策略,ts默认用node的解析策略,即相对的方式导入
"paths": {
// 路径映射,相对于baseUrl
"@/*": [
"src/*"
],
"#/*": [
"src/types/*"
]
},
"resolveJsonModule": true,
"types": [
"vite/client",
"vite-plugin-pages/client",
"vite-plugin-vue-meta-layouts/client",
"element-plus/global"
],
"allowImportingTsExtensions": true,
"allowJs": false,
"strict": true,
"strictNullChecks": true,
"noImplicitAny": false,
"noUnusedLocals": false,
"noEmit": true,
"sourceMap": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"isolatedModules": true,
"skipLibCheck": true
},
"references": [
{
"path": "./tsconfig.node.json"
}
], // 排除src目录下的lib文件夹下的文件不会编译
"files": [],
// 指定编译需要编译的文件或目录。
"include": [
"src/**/*.ts",
"src/**/*.d.ts",
"src/**/*.tsx",
"src/**/*.vue"
],
"exclude": [
"dist",
"node_modules",
"**/*.js",
"packages"
]
}