In a Vue.js project that utilizes Webpack, the imports use @
as an alias for the src
directory. How can I configure VSCode to properly resolve this alias and enable intellisense for those imports?
I have come across various methods online on setting up aliases in VSCode, such as using jsconfig.json
or tsconfig.json
. Despite configuring both files, none of them seem to be effective.
This is how my jsconfig.json looks like:
{
"compilerOptions": {
"target": "es6",
"allowSyntheticDefaultImports": false,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
I was hoping that by configuring VSCode in this way, it would successfully resolve the alias in the path and enable functions like intellisense and peeking definition.