Skip to content

Commit e8976b7

Browse files
committed
report error code when fatal error
fixes webpack#181
1 parent 48aad3e commit e8976b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bin/webpack.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ Error.stackTrackLimit = 30;
121121
webpack(options, function(err, stats) {
122122
if(err) {
123123
console.error(err.stack || err);
124+
if(!options.watch) {
125+
process.on("exit", function() {
126+
process.exit(1);
127+
});
128+
}
124129
return;
125130
}
126131
if(outputOptions.json)

0 commit comments

Comments
 (0)