Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Support typescript error check in umi dev #2442

Closed
robert-zaremba opened this issue May 20, 2019 · 2 comments
Closed

[Feature Request] Support typescript error check in umi dev #2442

robert-zaremba opened this issue May 20, 2019 · 2 comments

Comments

@robert-zaremba
Copy link

Background

When using umi dev with typescript, it will watch and compile all typescript files on the fly. It will also use the local tsconfig.json. However it doesn't display any typescript type errors and warnings. Hence we need to run npx tsc --noEmit to see typescript errors.

On the other hand when using create-react-app my-app --typescript and then react-scripts start will monitor and display all typescript errors.

Proposal

When using umi with typescript, show all typescript compilation errors and warnings.

Additional context

I've created a Stackoverflow question to see if there is an easy solution for that: https://stackoverflow.com/questions/56119734/how-i-can-instrument-umijs-to-output-typescript-type-errors

Example project with typescript setup:

https://github.com/robert-zaremba/react-umi-antdpro-ts-bootstrap/

@sorrycc
Copy link
Member

sorrycc commented May 21, 2019

Try the FORK_TS_CHECKER env variable.

@robert-zaremba
Copy link
Author

This works. Thanks. The build time (in umi watch mode) is a bit longer. Is this the right way to do? Shall we close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants