Skip to content

Commit

Permalink
fix: Build returns non-zero exit code for failed builds. Fixes #61
Browse files Browse the repository at this point in the history
  • Loading branch information
rkostrzewski committed Jun 1, 2017
1 parent b57dac4 commit 0a6d69a
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 0a6d69a

Please sign in to comment.