diff --git a/src/karma-webpack.js b/src/karma-webpack.js index 758189e..3e3cb03 100644 --- a/src/karma-webpack.js +++ b/src/karma-webpack.js @@ -62,7 +62,17 @@ function Plugin( this.basePath = basePath this.waiting = [] - var compiler = webpack(webpackOptions) + var compiler + try { + compiler = webpack(webpackOptions) + } catch (e) { + console.error(e.stack || e) + if (e.details) { + console.error(e.details) + } + throw e + } + var applyPlugins = compiler.compilers || [compiler] applyPlugins.forEach(function(compiler) {