Skip to content

Commit

Permalink
fix: Build returns non-zero exit code for failed builds. Fixes #61 (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkostrzewski authored and developit committed Jun 7, 2017
1 parent 61bacf9 commit 8539f42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib/run-webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default (watch=false, config, onprogress) => new Promise( (resolve, rejec
let compiler = webpack(config);

let done = (err, stats) => {
if (err) reject(err);
if (err || stats.hasErrors()) {
reject(err || stats.toJson().errors.join('\n'));
}
else {
// Timeout for plugins that work on `after-emit` event of webpack
setTimeout(()=>{
Expand Down

0 comments on commit 8539f42

Please sign in to comment.