Skip to content

Commit 2e3aedd

Browse files
Fatmepiotr-oles
authored andcommitted
fix: replace emit hook with afterCompile
The afterCompile hook should be blocked instead of emit in order to handle correctly noEmitOnErrors property from webpack.config.js BREAKING CHANGE: The emit hook is replaced with afterCompile hook.
1 parent ac95f23 commit 2e3aedd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ class ForkTsCheckerWebpackPlugin {
571571

572572
if ('hooks' in this.compiler) {
573573
// webpack 4+
574-
this.compiler.hooks.emit.tapAsync(checkerPluginName, emit);
574+
this.compiler.hooks.afterCompile.tapAsync(checkerPluginName, emit);
575575
} else {
576576
// webpack 2 / 3
577577
this.compiler.plugin('emit', emit);

0 commit comments

Comments
 (0)