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

Most upvoted comments

Sorry I’m currently snowed @fatme

I will try and take a look but it won’t be immediately I’m afraid

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 way noEmitOnErrors property in webpack.config will work out of the box.

It turns out that shouldEmit is not suitable for our case as it is SyncBailHook but we need AsyncSeriesHook. However, afterCompile seems the perfect solution as it is async hook and is executed before shouldEmit.