5

in my project I use 2 different tsconfig files

  • tsconfig.json
  • tsconfig.specs.json - for testing

how can I tell Intellij Idea to use both?
i.e. In Settings - Langauges & Frameworks - TypeScript I can switch between different Compile scopes, but the Options are not per compile scope (but only once per project).

Notes:

enter image description here

TmTron
  • 17,012
  • 10
  • 94
  • 142

1 Answers1

1

I think we only need to register the file-types:

In Settings | Editor | File Types > TypeScript Config add your custom tsconfig file names, e.g.

  • tsconfig.app.json
  • tsconfig.lib.json
  • tsconfig.spec.json
  • etc.

enter image description here

With these settings in place:

  • IntelliJ should show syntax highlighting and completion suggestions in your tsconfig files
  • the IntelliJ typescript service should recognize all these tsconfig files and compile everything:
    i.e. it is important that you use include/exclude in each of the tsconfig files, so that only the relevant files are compiled
TmTron
  • 17,012
  • 10
  • 94
  • 142