- All Courses
- TypeScript Deep Dive
- Tooling and Build
- Project references and monorepos
Project references and monorepos
Project references let one package depend on another package built output rather than its source, so the compiler can check and rebuild only what changed.
Overview
Many small builds instead of one enormous one
Project references let one package depend on another package built output rather than its source, so the compiler can check and rebuild only what changed. On a large repository the difference is minutes.
They also enforce the dependency graph. A package that has not declared a dependency simply cannot import from it, which stops the slow slide into an implicit ball of mud.
The cost is discipline: every package needs its own config and correct references, and a missing one produces an error message that does not obviously say so.
In this lesson you will:
- Split a large build into checkable units
- Keep package boundaries honest
- Speed up rebuilds with incremental output
Resources
Notes are not saved yet — they clear when you leave this page.
tsconfig options that matter
6m
Runtime validation with Zod
7m