在vscode开发中使用@ 处理项目路径后
import 变量不能点进去
处理如下
- 安装path 插件 Path Intellisense
- 生成配置文件 jsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}