vscode left click cannot jump to the defined file

When I used vscode before, I could obviously jump to the definition file with the ctrl key + the left mouse button, but suddenly it didn't work. When I moved the mouse to the introduction, there was no underline at all, so I couldn't jump.

Solution:

Create a new file in the root directory of the project  jsconfig.json, the code is as follows

{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "target": "ES6",
    "allowSyntheticDefaultImports": true
  },
  "include": [
    "src/**/*"
  ],
  "exclude": [
    "node_modules"
  ]
}

The effect is as shown in the figure

Hold down ctrl + move the mouse to see an obvious clickable jump.

Guess you like

Origin blog.csdn.net/qq_45600228/article/details/133344313