From 21640d2caf15e758ea3f83951b5f116da902062d Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Tue, 8 Nov 2022 22:51:03 +0800 Subject: [PATCH] =?UTF-8?q?chore(tsconfig.json):=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=A3=B0=E6=98=8E=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsconfig.json | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 961fc4c..4f8945a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,13 +10,20 @@ "resolveJsonModule": true, "esModuleInterop": true, "lib": ["esnext", "dom"], - "baseUrl": "./", + "baseUrl": ".", + "allowJs": true, "paths": { "@/*": ["src/*"] }, - "allowSyntheticDefaultImports": true, // 默认导入 - "skipLibCheck": true, // 不对第三方依赖类型检查 ,element-plus 生产打包报错 - "types": ["element-plus/global"] + "skipLibCheck": true /* Skip type checking all .d.ts files. */, + "allowSyntheticDefaultImports": true /* 允许默认导入 */, + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + "types": ["element-plus/global"], + "typeRoots": [ + "./node_modules/@types/", + "./types" + ] /* 指定多个文件夹,这些文件夹的作用类似于 './node_modules/@types'. */ }, - "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"] + "include": ["src/**/*.ts", "src/**/*.vue", "types/**/*.d.ts"], + "exclude": ["node_modules", "dist", "**/*.js"] }