From d776068f7c125085b000276eade4a79770bd1d12 Mon Sep 17 00:00:00 2001 From: Islam Sharabash Date: Mon, 30 May 2016 15:05:24 -0700 Subject: [PATCH] feat(webpack): karma execution blocker - Blocking on invalid, watch-run, and run events instead --- index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index f7412b7..90952b3 100644 --- a/index.js +++ b/index.js @@ -64,8 +64,14 @@ function Plugin( compiler.plugin("make", this.make.bind(this)); }, this); - compiler.plugin("compile", function() { - isBlocked = true + ["invalid", "watch-run", "run"].forEach(function(name) { + compiler.plugin(name, function(_, callback) { + isBlocked = true; + + if (callback) { + callback(); + } + }) }) compiler.plugin("done", function(stats) {