Project References (intro)
Split code into multiple tsconfig projects and reference them for faster incremental builds.
Project References (intro) is a free TypeScript Academy lesson on CoddyKit — lesson 3 of 3. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the TypeScript Academy learning path, one of 3 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Intro
Goal: Learn Project References. They connect multiple tsconfig projects to improve build speed and organization.
Root config
At the root, add a references array. Each path points to another tsconfig project folder.
// tsconfig.json (root)
{
"files": [],
"references": [
{ "path": "./core" },
{ "path": "./web" }
]
}Composite project
Each referenced project must enable composite. This allows TypeScript to emit metadata for dependency tracking.
// core/tsconfig.json
{
"compilerOptions": {
"composite": true,
"outDir": "../dist/core"
},
"include": ["src"]
}Reference another
The web project references core. tsc will build core first, then web, reusing outputs.
// web/tsconfig.json
{
"compilerOptions": {
"composite": true,
"outDir": "../dist/web"
},
"references": [
{ "path": "../core" }
]
}Build command
Use tsc --build (or -b) to compile all referenced projects. Incremental builds are much faster.
// Build all projects
npx tsc --build
// Incremental rebuild when only core changes
npx tsc --build coreIDE support
VS Code understands Project References: jumping between projects, showing errors consistently, and reusing declaration outputs.
Benefit check
Quick check: What is the main benefit of Project References?
Recap
Recap: Project References split code into subprojects with composite configs. They improve build speed and organization in large repos.
Frequently asked questions
Is the “Project References (intro)” lesson free?
Yes — the full text of “Project References (intro)” is free to read here on the web, and the TypeScript Academy course includes 3 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the TypeScript Academy course, upgrade to CoddyKit PRO.
What will I learn in “Project References (intro)”?
Split code into multiple tsconfig projects and reference them for faster incremental builds. You practise TypeScript Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start TypeScript Academy?
No prior experience is required. TypeScript Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 3, so you can start here or from the beginning and move at your own pace.
How long does the “Project References (intro)” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this TypeScript Academy lesson?
Yes. Every TypeScript Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Strictness flags
- Target, lib, module, JSX settings
- Project References (intro)