Skip to content

Change the behavior of tsc on a tsconfig solutionΒ #60479

@ArnaudBarre

Description

@ArnaudBarre

πŸ” Search Terms

The Vite starters now use a "solution" tsconfig, as documented in the docs.

The issue is that a lot of people are used to run tsc or tsc --noEmit at the root of the project, and now, this silently does nothing.

βœ… Viability Checklist

⭐ Suggestion

I think in that specific case, it should do one of those two things:

  • make it an error in that case with "You probably want tsc -b"
  • default to build mode (when the tsconfig contains files: [])

πŸ“ƒ Motivating Example

You have three chars less to type? πŸ˜…

More seriously, it's about making project references more used without a familiar command becoming useless

πŸ’» Use Cases

  1. What shortcomings exist with current approaches?

We get some reports like this: vitejs/vite#17585

I suspect a lot more people fall for this, but find the issue before opening an issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    In DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions