vscode 配置import @ 路径提示及代码智提
1、安装插件:Path Intellisense
2、配置:
"path-intellisense.mappings": {
"@": "${workspaceRoot}/src"
}
3、在项目package.json所在同级目录下创建文件jsconfig.json:
{
"compilerOptions": {
"target": "ES6",
"module": "commonjs",
"allowSyntheticDefaultImports": true,
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": [
"node_modules"
]
}
posted on 2019-03-04 14:07 zhangzongshan 阅读(6637) 评论(0) 编辑 收藏 举报