Reputation: 21
I'm using VS Code for my Vuejs project and I resolve the "src" path with "@", here is my config:
And here is where I use the import statement with "@"
The web runs fine but I cannot click to go to my file. Please help
Upvotes: 0
Views: 1825
Reputation: 902
This worked for me!
{
"compilerOptions": {
"composite": true,
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
},
// vvv REMOVE
"include": [
"vite.config.js"
],
// ^^^ REMOVE
"exclude": [
"node_modules",
"dist",
".git"
]
}
If the paths that you import are not present in include
VSCode will not detect them as "ctrl+clickable".
include
doc:
Specifies a list of glob patterns that match files to be included in compilation. If no 'files' or 'include' property is present in a tsconfig.json, the compiler defaults to including all files in the containing directory and subdirectories except those specified by 'exclude'. Requires TypeScript version 2.0 or later.
Upvotes: 0