Skip to content

Commit 4216f13

Browse files
authored
fix: don't swallow configuration errors (#232)
* fix: don't swallow configuration errors * style: fix semi lint issues
1 parent f3a9e8e commit 4216f13

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/karma-webpack.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@ function Plugin(
6262
this.basePath = basePath
6363
this.waiting = []
6464

65-
var compiler = webpack(webpackOptions)
65+
var compiler
66+
try {
67+
compiler = webpack(webpackOptions)
68+
} catch (e) {
69+
console.error(e.stack || e)
70+
if (e.details) {
71+
console.error(e.details)
72+
}
73+
throw e
74+
}
75+
6676
var applyPlugins = compiler.compilers || [compiler]
6777

6878
applyPlugins.forEach(function(compiler) {

0 commit comments

Comments
 (0)