summaryrefslogtreecommitdiff
path: root/tsconfig.json
diff options
context:
space:
mode:
authorpany <[email protected]>2022-04-21 00:50:12 +0800
committerpany <[email protected]>2022-04-21 00:50:12 +0800
commit048aed5408b17557e31d1bc8dd0793a82a1c4b7c (patch)
treef64bfa7fb5f5dfe9af7ad5165bd29a94453d070e /tsconfig.json
parentf600209445151c7d3e9cfe31e929e95b0bcd65ca (diff)
chore: 路径别名
Diffstat (limited to 'tsconfig.json')
-rw-r--r--tsconfig.json8
1 files changed, 7 insertions, 1 deletions
diff --git a/tsconfig.json b/tsconfig.json
index 7b568ca..85b1e03 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -17,7 +17,13 @@
"dom"
],
"skipLibCheck": true,
- "types": ["vite/client"]
+ "types": ["vite/client"],
+ /** baseUrl 用来告诉编译器到哪里去查找模块,使用非相对模块时必须配置此项 */
+ "baseUrl": ".",
+ // 非相对模块导入的路径映射配置,根据 baseUrl 配置进行路径计算
+ "paths": {
+ "@/*": ["src/*"]
+ },
},
"include": [
"src/**/*.ts",