Skip to content

Allow multiple tsconfig configurations for --project flag in cliΒ #50898

@michal-minich

Description

@michal-minich

Suggestion

πŸ” Search Terms

is:open project multiple label:Suggestion

βœ… Viability Checklist

My suggestion meets these guidelines:

  • This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • This wouldn't change the runtime behavior of existing JavaScript code
  • This could be implemented without emitting different JS based on the types of the expressions
  • This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
  • This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion / πŸ“ƒ Motivating Example

allow tsc to be invoked with multiple project configuration with --project / -p flag in cli like:

tsc --project tsconfig.dev.json tsconfig.prod.json

alternative syntax:
tsc --project tsconfig.dev.json --project tsconfig.prod.json

currently it is only possible to have 1 configuration per tsc run, so tsc has to be executed for each tsconfig like:

tsc --project tsconfig.dev.json 
tsc --project tsconfig.prod.json

Note --build / -b flag allows specify multiple projects already.

πŸ’» Use Cases

This is useful when one projects has more target configurations (e.g. for deployments / testing / user agents / devices).
This is performance optimization only. The end result is already achievable by ruining tsc multiple times.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeclinedThe issue was declined as something which matches the TypeScript visionSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions