Skip to content

Commit

Permalink
Added done call to error handling so plugin properly returns errors t…
Browse files Browse the repository at this point in the history
…o webpack
  • Loading branch information
Haddix, Steven authored and Haddix, Steven committed Dec 29, 2016
1 parent 8afc041 commit bc777ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ SuperAwesomeWebpackPlugin.prototype.apply = function(compiler) {

Promise.all(sitePromises)
.then(() => done())
.catch((err) => compilation.errors.push(err.stack))
.catch((err) =>{
compilation.errors.push(err.stack)
done();
})
} catch (err) {
compilation.errors.push(err.stack);
done();
Expand Down

0 comments on commit bc777ce

Please sign in to comment.