From 22cd6da835ab2e7870b224ed3eb895e88f6031f7 Mon Sep 17 00:00:00 2001 From: zouzhibing Date: Sun, 4 Dec 2022 22:09:49 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=92=A5=20=E6=96=B0=E5=A2=9Etsconf?= =?UTF-8?q?ig=20path=E6=98=A0=E5=B0=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 00d0ae7..31ebbd2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,8 +12,18 @@ "esModuleInterop": true, "lib": ["ESNext", "DOM"], // 跳过库检查,解决打包失败 - "skipLibCheck": true + "skipLibCheck": true, + // 解析非相对模块名的基准目录 + "baseUrl": "./", + // 模块名到基于 baseUrl 的路径映射的列表。 + "paths": { + "@": ["src"], + "@/*": ["src/*"] + } }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], - "references": [{ "path": "./tsconfig.node.json" }] + "references": [ + { "path": "./tsconfig.node.json" } + ], + "exclude": ["node_modules","dist","**/*.js"] }