Vue 解决@别名不能识别目录的问题, vscode不出现目录提醒和Ctrl+左键点击不能跳转的问题
时间:2020-08-13 09:14:57
收藏:0
阅读:1056
问题描述
- 问题1:在使用
@引入src下某个目录下文件的时候,会出现不能智能提示的情况 - 问题2:Ctrl+左键点击跳不能转打开到文件所在目录
import { getUser } from ‘@/utils/auth‘
解决方法
- 在项目
根目录下添加jsconfig.json文件,配置如下
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": [
"src/*"
]
}
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"dist"
]
}
原文:https://www.cnblogs.com/leslie1943/p/13493829.html
评论(0)