DEV Community

Discussion on: TypeScript monorepo for React project

checkmatez profile image
Max • Edited on

You might want to take a look at Apollo monorepo setup:
In particular, you can address "problem 1" by adding "composite": true and "references" to tsconfig.json in packages, so Typescript compiler will take care of building in the right order. This requires Typescript 3.0+ (
Problem 2 will go away if you use different tsconfig for testing.

stereobooster profile image
stereobooster Author

Yep, people already point this out All problems resolved.

Problem 2 can't be solved gracefully with different config, because we need to run build before running tests, so it will get confusing. Instead I added babel to process ES6 modules