fork-ts-checker-webpack-plugin: v2.0.0 breaks async: false
Current behavior
If I have async: false
, our webpack
build (webpack-dev-serverwill not finish and just stuck at
wait until bundle finished`
Expected behavior
In v1.6.0
, this does not happen.
Steps to reproduce the issue
I am using this plugin with eslint
, typescript-eslint
, webpack
and ts-pnp
(similar to the setup of create-react-app
).
I have async: false
in webpack config and that’s when I see problem with 2.0.0. async:false
is kind of important to me because I want to fail the webpack build when there are type issues (warning or error), also I want webpack to be the reporter of error because I have a decent error format reporter there 😃. As such I want to block webpack build to finish until this plugin’s done with checking type, but somehow after upgrading to 2.0.0 that nolonger happens.
Issue reproduction repository
Really sorry the project I’m working on doesn’t have a public repo so it would take me time to create a repo for this
Environment
- fork-ts-checker-webpack-plugin: 2.0.0
- typescript: 3.6.4
- webpack: 4.41.2
- os: Windows 10
P/S: Honestly though the more I think about this the more I want to ask you guys what’s your view on this? Do you want to fail a build when there are typescript/linting errors?
I don’t know of a way to have async:true
and still fail webpack compilation build using this plugin` 😦, let me know if I miss some config. Thanks!
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 17 (10 by maintainers)
Commits related to this issue
- nowngraded fork-ts-checker-webpack-plugin because of https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/issues/351 — committed to FreemapSlovakia/freemap-v3-react by zdila 5 years ago
- fix: revert 2.0.0 afterCompileCallback changes BREAKING CHANGE: 🧨 afterCompileCallback replaced with emitCallback ✅ Closes: #351 — committed to TypeStrong/fork-ts-checker-webpack-plugin by johnnyreilly 5 years ago
- fix: revert 2.0.0 afterCompileCallback changes (#352) BREAKING CHANGE: 🧨 afterCompileCallback replaced with emitCallback ✅ Closes: #351 — committed to TypeStrong/fork-ts-checker-webpack-plugin by johnnyreilly 5 years ago
- fix: convert afterCompile to emit ✅ Closes: #351 — committed to TypeStrong/fork-ts-checker-webpack-plugin by johnnyreilly 5 years ago
- fix: convert afterCompile to emit (#353) ✅ Closes: #351 — committed to TypeStrong/fork-ts-checker-webpack-plugin by johnnyreilly 5 years ago
🎉 This issue has been resolved in version 3.0.1 🎉
The release is available on:
Your semantic-release bot 📦🚀
Okay just force merged https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/pull/353/files
A new release should appear with the fix in the next couple of hours.
v3.0.1
. Serves me right for merging in the middle of a sleepless night. Ah well.@johnnyreilly am I missing something, I thought this line is supposed to be reverted to
.emit.tapAsync
right? (based on this commit)Just tried 3.0.0 and I still see the problem.
Very strangely, this issue affected me with one entry point, but not another of the multi-compiler entries in the same build; both use typescript and the same
tsconfig.json
. But yes, can confirm that rolling back to<2.0.0
avoids the breakage.Yeah,
But I am most interested in the part that why in
async:false
mode, the plugin fiddles with what comes from style files. And if there is more than one style file it completely hangs.I must say I am relieved though. Have been banging my head over wall to figure out why the build was failing. At first I thought, it was something to do with
mini-css-extract-plugin
, but it turns out to be this.One thing I would like to add more is that, if I use
style-loader
instead ofMiniCssExtractPlugin.loader
, the issue just goes away.