最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to specify a specific tsconfig.json in WebStorm - Stack Overflow

programmeradmin1浏览0评论

WebStorm by default takes the tsconfig.json in the root directory of a project. Is there any way that we can point this to custom tsconfig.json file path using the settings?

I can see the options in TypeScript section of WebStorm settings, but I cannot figure out the correct way to specify tsconfig.json.

WebStorm by default takes the tsconfig.json in the root directory of a project. Is there any way that we can point this to custom tsconfig.json file path using the settings?

I can see the options in TypeScript section of WebStorm settings, but I cannot figure out the correct way to specify tsconfig.json.

Share Improve this question edited Mar 28, 2018 at 8:35 LazyOne 165k47 gold badges413 silver badges415 bronze badges asked Mar 28, 2018 at 7:38 gauravmukgauravmuk 1,61614 silver badges20 bronze badges 1
  • It looks like there isn't an option to specify which tsconfig is used - ideally all of them. It just uses the tsconfig by default`. – Ben Butterworth Commented Dec 22, 2023 at 23:20
Add a comment  | 

2 Answers 2

Reset to default 14

You can use the -p option of the tsc command.

On webstorm, click on configure (the wrench)

Then add -p yourTsConfig.json in the Options field.

If Recompile on changes is enabled in Preferences | Languages & Frameworks | TypeScript, it uses the nearest tsconfig.json current file is included in, scanning folders from the file folder up to the project root. If it's disabled, you can compile using Compile button in Typescript tool window toolbar - when pressing this button, you can choose a tsconfig.json to be used for compilation

发布评论

评论列表(0)

  1. 暂无评论