1 在首选项中配置
"path-intellisense.mappings": {
"@": "${workspaceRoot}/src"
}
2 添加jsconfig.json文件
{
"compilerOptions": {
"target": "es6",
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
},
"module": "es6",
"allowSyntheticDefaultImports": true
},
"include": [
"src/**/*"
],
"exclude": ["node_modules", "dist"]
}
网友评论