Skip to content
This repository has been archived by the owner on Feb 18, 2020. It is now read-only.

Commit

Permalink
Merge pull request chrisvfritz#232 from cbravo/feat-error-handling
Browse files Browse the repository at this point in the history
feat(errors): adds error handling that will terminate the node process.
  • Loading branch information
JoshTheDerf authored Aug 14, 2018
2 parents 995aebc + 6b7f2b3 commit 1d6188e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion es5-autogenerated/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ PrerenderSPAPlugin.prototype.apply = function (compiler) {
}).catch(function (err) {
PrerendererInstance.destroy();
console.error('[prerender-spa-plugin] Unable to prerender all routes!');
throw err;
compilation.errors.push(new Error('[prerender-spa-plugin] Unable to prerender all routes!'));
done();
});
};

Expand Down
5 changes: 3 additions & 2 deletions es6/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,9 @@ PrerenderSPAPlugin.prototype.apply = function (compiler) {
})
.catch(err => {
PrerendererInstance.destroy()
console.error('[prerender-spa-plugin] Unable to prerender all routes!')
throw err
console.error('[prerender-spa-plugin] Unable to prerender all routes!');
compilation.errors.push( new Error( '[prerender-spa-plugin] Unable to prerender all routes!' ) );
done();
})
}

Expand Down

0 comments on commit 1d6188e

Please sign in to comment.