Skip to content

TypeScript performance during watch mode #7309

@deftomat

Description

@deftomat

CRA performance can still be a pain with TypeScript.

We already reduce the waiting times for type-check by #5903, then we speed it up even more by using the IncrementalAPI in fork-ts-checker-webpack-plugin.

Unfortunately, even after all of these improvements, type-check can took 5 or more seconds to finish in big projects. Yes, it's much better now as you can see your changes immediately and type-errors will appear when they are ready.

Now, the important thing:

I discover that using the isolatedModules: false in tsconfig.json reduces type-checks between code changes from 5 seconds to less than 1 second.

I know the reason, why we are using isolatedModules - it is a limitation of Babel compiler. However, we should definitely do something with it as developers are required to wait a lot of time just to catch a few edge cases.

I'm not sure how to solve it right now but I'm pretty sure that we can figure it out together.

cc @johnnyreilly (creator of fork-ts-checker-webpack-plugin)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions