Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do define source root in VS Code

Tags:

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

Is there a simular way of doing this in VS Code? It doesnt understand my js imports.

like image 740
Rane Avatar asked Mar 15 '17 10:03

Rane


1 Answers

Create a file jsconfig.json at the root of you project with the following content (replace src with relative source root):

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

For further details: https://github.com/Microsoft/vscode/issues/14907#issuecomment-306853768

like image 106
Sahil Ahuja Avatar answered Sep 22 '22 11:09

Sahil Ahuja