TypeScript: Slow compilation time
See original GitHub issueNow that create-react-app
now natively supports typescript, I gave it a try. I expected near instant compilation times after making a change to a file, just like with JavaScript. Instead, I got about 3-5s of delay on the official typescript cra (out of the box). I thought this delay would disappear after moving to babel 7, I thought we simply strip off TypeScript when running the dev server and properly compile TypeScript and check for errors when building the production build? Is this possible?
Issue Analytics
- State:
- Created 5 years ago
- Reactions:47
- Comments:10 (2 by maintainers)
Top Results From Across the Web
tsc compilation slow on moderate sized project #37635 - GitHub
I'm trying to debug why my typescript compiler is taking 9-13 seconds to recompile. This impacts ts-node and development drastically. typescript ...
Read more >How to speed up your TypeScript project? - The Software House
In its raw form, running the `npm run watch` command (which starts the TypeScript Compiler – tsc – in a watch mode) takes...
Read more >TypeScript 4.6 - Compilation is too slow at least for me with ...
TypeScript 4.6 - Compilation is too slow at least for me with 50000 lines of code, moving back to pure JS.
Read more >Optimizing TypeScript - Wallaby.js
There's one more method that we can use to compile TypeScript, swc. The average time to compile our project with swc is 0.461...
Read more >Typescript background compilation is very slow, sometimes ...
I want to use compile on save feature, turning it off is not an option, because running gulp/watch is a pain, gets stuck...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just change tsconfig.json , “skipLibCheck” : true
@ianschmitz Changing the
.
ForkTsCheckerWebpackPlugin
configasync
to true andsilent
to false seems to fix both the issues you stated above. Errors are perfectly displayed.Obviously, because async is enabled and the ts checking takes more than the babel process, the errors are displayed with a delay.