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

reportFiles as an exclude alternative #177

Closed
johnnyreilly opened this issue Oct 27, 2018 · 1 comment
Closed

reportFiles as an exclude alternative #177

johnnyreilly opened this issue Oct 27, 2018 · 1 comment

Comments

@johnnyreilly
Copy link
Member

johnnyreilly commented Oct 27, 2018

@Timer said here: #173 (comment)

Ooh, that'd be fantastic to implement. I don't want to ship excludes with CRA (in the tsconfig -- I'd way rather silently filter out tests).

@johnnyreilly could you suggest a location to perform the filtering at?

In the workers themselves, at where the worker aggregates, somewhere else? Can you please point to a file or some lines? 😄

That's a merged PR and so it's less visible. I didn't want it to get lost as I think it's a great suggestion. 😄 Do take a look at the conversation there.

cc @ianschmitz

@johnnyreilly
Copy link
Member Author

johnnyreilly commented Oct 27, 2018

Suggested implementation (copied from #173 (comment) )

@Timer - sorry about the delay in replying!

The simplest implementation would seem to be taking the approach ts-loader employs here:

https://github.com/TypeStrong/ts-loader/blob/d49dfbaa7e35c728090554d47a122ad2571cb09c/src/utils.ts#L54-L75

and adding a filter in before the forEach in fork-ts-checker-webpack-plugin here:

https://github.com/Realytics/fork-ts-checker-webpack-plugin/blob/458cd748519c04501298c342de31acf1b2f84336/src/index.ts#L741

This would be handling it in the worker aggregate position. It's possible that there might be a minor performance benefit to doing this in the worker itself but I'm not sure how big the gain would be. Simplicity is a wonderful thing so I reckon we should do it here. (We could always change it later if desired.)

@johnnyreilly johnnyreilly changed the title reportFiles as an exclude alternative @Timer reportFiles as an exclude alternative Oct 27, 2018
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

1 participant