Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebStorm not loading specific tsconfig.json

I have a project using the latest version of WebStorm 2020.3.1. I have multiple tsconfig.json files but I only need automatic re-compilation through WebStorm for one of them. I have configured as attached.

Strange thing is that running tsc -p ./tsconfig-electron.json works fine.

What is the issue here?

WebStorm TypeScript compilation

tsconfig-electron.json:

{
    "compilerOptions": {
        "module": "commonjs",
        "target": "es6",
        "sourceMap": true,
        "outDir": "electron-dist",
        "rootDir": "electron-src",
        "removeComments": true,
        "strict": true
    },
    "exclude": [
        "node_modules",
        "dist",
        "src",
        "e2e"
    ],
    "declaration": true
}
like image 579
t348575 Avatar asked Oct 27 '25 10:10

t348575


1 Answers

The IDE uses the nearest tsconfig.*.json current file is included in for compiling, traversing the folders hierarchy from current folder up to the IDE project root. The list of known tsconfig*.json name patterns can be configured in Settings | Editor | File Types, TypeScript Config.

Options passed in Settings | Languages & Frameworks | TypeScript, Options: are ignored if there are tsconfig.*.json files in project, so you can't pass your custom configuration file to the IDE using this field.

Related feature request: WEB-21414

like image 148
lena Avatar answered Oct 30 '25 00:10

lena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!