fork-ts-checker-webpack-plugin: Suport for noEmitOnError?
Hey guys, is it possible to use the noEmitOnError from tsconfig.json?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 20 (11 by maintainers)
Commits related to this issue
- fix: use 'afterCompile' hook to fix regression described in #57 — committed to TypeStrong/fork-ts-checker-webpack-plugin by piotr-oles 4 years ago
- fix: use 'afterCompile' hook to fix regression described in #57 — committed to TypeStrong/fork-ts-checker-webpack-plugin by piotr-oles 4 years ago
Sorry I’m currently snowed @fatme
I will try and take a look but it won’t be immediately I’m afraid
@johnnyreilly,
Here is the PR - https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/pull/337.
Do you want to raise a speculative PR and let’s see where it goes?
Hey @piotr-oles, @eddyw, @johnnyreilly, @knaos, @vepanimas,
We’ve hit the same issue and spent some time to investigate it.
@vepanimas, You’re absolutely correct that we’ll got it working if we move the logic from emit hook to an earlier stage of webpack compilation. According to the source code in webpack repo, we need to push errors in compilation object before or at the latest on
shouldEmit. This waynoEmitOnErrorsproperty in webpack.config will work out of the box.It turns out that
shouldEmitis not suitable for our case as it is SyncBailHook but we needAsyncSeriesHook. However,afterCompileseems the perfect solution as it isasynchook and is executed beforeshouldEmit.