Skip to content

"Referenced projects must have the new composite setting enabled" does not hold trueΒ #60465

Open
@haoqunjiang

Description

@haoqunjiang

πŸ”Ž Search Terms

composite, project references, solution-style tsconfig

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about tsconfig.

⏯ Playground Link

https://vite.new/react-ts

πŸ’» Code

The above link is a project created from the vite react-ts template (https://vite.new/react-ts).
It uses project references in tsconfig.json, but no composite: true specified in both tsconfig.app.json and tsconfig.node.json.

On the other hand, the TypeScript handbook says:

Referenced projects must have the new composite setting enabled.

πŸ™ Actual behavior

The project builds (npm run build) successfully without composite: true.

πŸ™‚ Expected behavior

If I understand correctly, the documentation means I have to specify composite: true when using references. I'd expect an error or warning if I didn't follow the guide.

Additional information about the issue

I'm curious whether it's a bug or a feature.
If it's a bug, what's the expected behavior?
If it's a feature, I'd like to see the documentation updated accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsThe issue relates to how you learn TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions