Split a TypeScript codebase with tsconfig project references
8 steps · about 1 h 18 min · Intermediate
- Set up a tsconfig.json with extends and includes (doc, TypeScript, 10 min)
Covers how config files are found, inherited and scoped to files.
- Link projects with references and tsc --build (guide, TypeScript, 20 min)
The core guide to splitting one big program into fast, ordered builds.
- Mark a package as composite (reference, TypeScript, 5 min)
Explains the constraints a referenced project must meet.
- Speed up rebuilds with incremental build info (reference, TypeScript, 5 min)
Shows how .tsbuildinfo files let tsc skip unchanged work.
- Jump to source across packages with declaration maps (reference, TypeScript, 5 min)
Keeps go-to-definition working in editors when packages consume built output.
- Map import aliases with paths (reference, TypeScript, 8 min)
Explains what paths does and does not do at runtime.
- Run tsc with the right command-line flags (doc, TypeScript, 15 min)
Lists build-mode flags like --verbose, --clean and --force for debugging builds.
- Start from a maintained base tsconfig (repo, TSConfig Bases, 10 min)
Community bases give sensible defaults per runtime that projects can extend.