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

.tsx files are not type checked #338

Closed
jeffijoe opened this issue Oct 1, 2019 · 4 comments

Comments

@jeffijoe
Copy link

commented Oct 1, 2019

Current behavior

.tsx files are not type checked. This can be fixed in userland with a reportFiles option.

Expected behavior

Since ts-loader is configured for .tsx, I thought it would also check .tsx files.

Steps to reproduce the issue

Use the README config, then add a .tsx file with a type error in it.

Environment

  • fork-ts-checker-webpack-plugin: 1.5.0
  • typescript: 3.5.2
  • tslint: 5.18.0
  • webpack: 4.38.0
  • os: macOS Mojave
@jeffijoe jeffijoe added the bug label Oct 1, 2019
@phryneas

This comment has been minimized.

Copy link
Collaborator

commented Oct 1, 2019

The fork-ts-checker-webpack-plugin uses the files/include/exclude rules of your tsconfig.json - are you maybe missing tsxfiles there?

@jeffijoe

This comment has been minimized.

Copy link
Author

commented Oct 1, 2019

I didn't use includes as ts-loader doesn't seem to care about it. But that makes sense!

@johnnyreilly

This comment has been minimized.

Copy link
Member

commented Oct 1, 2019

Might be worth comparing your setup to this: https://github.com/TypeStrong/ts-loader/tree/master/examples/fork-ts-checker-webpack-plugin

I can say for sure that the checker checks tsx. 😁

@jeffijoe

This comment has been minimized.

Copy link
Author

commented Oct 1, 2019

Well damn it, reverted my changes and now it works. Classic. 😂

Sorry about the false positive! No idea why it didn't work before, but I swear I'm not crazy. 😅

@jeffijoe jeffijoe closed this Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.