Skip to content

Commit

Permalink
fix: don't swallow configuration errors (#232)
Browse files Browse the repository at this point in the history
* fix: don't swallow configuration errors

* style: fix semi lint issues
  • Loading branch information
joshwiens committed Mar 15, 2017
1 parent f3a9e8e commit 4216f13
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/karma-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4216f13

Please sign in to comment.