最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

javascript - How do define source root in VS Code - Stack Overflow

matteradmin5PV0评论

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

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

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

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

Share Improve this question asked Mar 15, 2017 at 10:21 RaneRane 3751 gold badge6 silver badges18 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 4

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

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

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

Post a comment

comment list (0)

  1. No comments so far