https://geekdaxue.co/read/me-note@vue/mydm8l
需要设置 basicURL
然后就生效了
{
"compilerOptions": {
// 设置解析非相对模块名称的基本目录
"baseUrl": ".",
// 设置模块名到基于baseUrl的路径映射,可以设置路径别名的语法提示
"paths": {
"@/*": ["src/*"],
"~/*": ["src/assets/*"],
"#/*": ["src/scripts/*"]
},
},
}
标签:src,vscode,别名,报错,设置,vue3
From: https://www.cnblogs.com/pphboy/p/17299494.html