How to determine source root in VS Code

In Webstorm, I can easily mark folders as the source root or some other things. But the source root is most important when ctrl clicks on components in your code.

Is there a sim-like way to do this in VS Code? He does not understand my js import.

+4
source share
1 answer

Create a file jsconfig.jsonin the root of your project with the following contents (replace src with the relative root of the source code):

{
  "compilerOptions": {
    "baseUrl": "./src"
  }
}

For more information: https://github.com/Microsoft/vscode/issues/14907#issuecomment-306853768

+2
source

Source: https://habr.com/ru/post/1672341/


All Articles