TypeScript Project References for Monorepo Performance
Migrating Large TypeScript Codebases To Project References - Shopify

Migrating Large TypeScript Codebases To Project References - Shopify

7/29/2020

What this post added

This post details the migration of a large TypeScript codebase to use TypeScript Project References. It addresses the problem of slow editor performance (TS-Server initialization taking minutes) in monolithic TypeScript projects. The solution involves breaking the codebase into smaller, inter-referenced projects. The post outlines the process of identifying leaf nodes, creating project-level tsconfig.json files, and referencing them. It also introduces a custom VSCode plugin, TypeTrack, for measuring editor initialization time improvements and provides documentation for other teams to adopt this strategy. The core technical contribution is the systematic application of Project References to improve monorepo developer experience.

Read the original post ↗