jsconfig.json 是一个用于配置JavaScript项目的文件,它可以影响如何处理import/export语句,以及如何进行代码导航和自动补全。
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
// 解决项目中使用@作为路径别名,导致vscode无法跳转文件的问题
"@/*": ["src/*"],
"@components/*": ["src/components/*"],
"@views/*": ["src/views/*"]
},
// 解决prettier对于装饰器语法的警告
"experimentalDecorators": true,
// 解决.jsx文件无法快速跳转的问题
"jsx": "preserve"
},
//提高 IDE 性能 不包含这些路径
"include": ["src/**/*", "src/**/*.vue"],
// 制定包含这些路径
"exclude": ["node_modules", "dist", "build"],
}