From 96a6a7efd1a52f8c4b9b0525702b122e58342dba Mon Sep 17 00:00:00 2001 From: zhaozhenfang Date: Wed, 12 Jun 2024 10:54:22 +0800 Subject: [PATCH] add the configuration alias '@' in tsconifg.json --- elk/web/index.html | 2 +- elk/web/tsconfig.json | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/elk/web/index.html b/elk/web/index.html index 1f3105ab..676ff8a2 100644 --- a/elk/web/index.html +++ b/elk/web/index.html @@ -2,7 +2,7 @@ - + ELK diff --git a/elk/web/tsconfig.json b/elk/web/tsconfig.json index 9e03e604..25133e92 100644 --- a/elk/web/tsconfig.json +++ b/elk/web/tsconfig.json @@ -18,8 +18,15 @@ "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "noFallthroughCasesInSwitch": true + "noFallthroughCasesInSwitch": true, + + /* Module Resolution Options */ + "baseUrl": ".", /* baseUrl用于设置解析非相对模块名称的基本目录,相对模块不会受baseUrl的影响 */ + "paths": { + "@/*": ["src/*"] /* 用于设置模块名称到基于baseUrl的路径映射 */ + } }, "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"], - "references": [{ "path": "./tsconfig.node.json" }] + "references": [{ "path": "./tsconfig.node.json" }], + } -- Gitee