我正在尝试为我的 Vue.js 项目中的components
和sub-directories
使用创建别名。jsconfig.json
但我收到此错误:
jsconfig.json
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@components/*": [
"./src/components/*"
],
}
},
"exclude": [
"node_modules"
]
}
一些文件.vue
import GuestLayout from '@components/Layouts/GuestLayout';
错误:
ERROR Failed to compile with 1 error
...
To install it, you can run: npm install --save @components/Layouts/GuestLayout
我尝试解决这个问题,但似乎没有任何效果。这是找到的最简单的https://www.youtube.com/watch?v=U73TDohXmhQ
我在这里做错了什么..?