项目根目录添加jsconfig.json
jsconfig.json
按住Ctrl / Command
@后面匹配的文件/引入的文件可直接跳转
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
},
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}