build: 添加jsconfig.json配置文件以支持路径别名和模块解析
该配置文件为项目添加了路径别名(如@/*、@components/*等),并配置了TypeScript/JavaScript编译选项,以支持ES2020目标、严格模式、模块解析等功能。这将提高代码的可维护性和开发体验。
Showing
1 changed file
with
29 additions
and
0 deletions
jsconfig.json
0 → 100644
| 1 | +{ | ||
| 2 | + "compilerOptions": { | ||
| 3 | + "baseUrl": ".", | ||
| 4 | + "paths": { | ||
| 5 | + "@root/*": ["./*"], | ||
| 6 | + "@/*": ["./src/*"], | ||
| 7 | + "@components/*": ["./src/components/*"], | ||
| 8 | + "@composables/*": ["./src/composables/*"], | ||
| 9 | + "@utils/*": ["./src/utils/*"], | ||
| 10 | + "@images/*": ["./src/assets/images/*"], | ||
| 11 | + "@css/*": ["./src/assets/css/*"], | ||
| 12 | + "@mock/*": ["./src/assets/mock/*"], | ||
| 13 | + "common/*": ["./src/common/*"], | ||
| 14 | + "@api/*": ["./src/api/*"] | ||
| 15 | + }, | ||
| 16 | + "target": "ES2020", | ||
| 17 | + "module": "ESNext", | ||
| 18 | + "moduleResolution": "node", | ||
| 19 | + "jsx": "preserve", | ||
| 20 | + "strict": true, | ||
| 21 | + "allowJs": true, | ||
| 22 | + "checkJs": false, | ||
| 23 | + "resolveJsonModule": true, | ||
| 24 | + "esModuleInterop": true, | ||
| 25 | + "skipLibCheck": true | ||
| 26 | + }, | ||
| 27 | + "include": ["src/**/*", "build/**/*", "vite.config.js"], | ||
| 28 | + "exclude": ["node_modules", "dist"] | ||
| 29 | +} |
-
Please register or login to post a comment