-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
TypeScript Version: 3.6.0-dev.20190704 | 3.5.2
Search Terms: isolatedModules, performance
We discovered that using isolatedModules=false in React apps drastically decrease type-check times. For example, in our application, tsc --watch --noEmit can took 5 seconds with isolatedModules=true. However, when we change it to isolatedModules=false, then the incremental type-check took 1 second or less.
The obvious solution is to disable isolated modules. Unfortunately, our application us create-react-app which use Babel to compile TS into JS and fork-ts-checker-webpack-plugin to run type-checks.
Due to Babel limitations, isolatedModules=true is a recommended option. TypeScript is definitely fast enough to make developers happy but we are forced to wait a lot of seconds just to catch a few edge cases.
So, my question is: Is this a bug or just a limitation of isolatedModules option?
Being able to use TypeScript in existing Babel toolchains is a huge thing but we are missing the last thing: SPEED 😞
(Related to facebook/create-react-app#7309)