Skip to content

Commit 34b84e4

Browse files
Jasper De Moordevongovett
authored andcommitted
Exit on build error when running parcel build (#176)
* exit * use exitCode for gracefull exiting
1 parent 644f195 commit 34b84e4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/Bundler.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ class Bundler extends EventEmitter {
148148
if (this.hmr) {
149149
this.hmr.emitError(err);
150150
}
151+
152+
if (process.env.NODE_ENV === 'production') {
153+
process.exitCode = 1;
154+
}
151155
} finally {
152156
this.pending = false;
153157
this.emit('buildEnd');

0 commit comments

Comments
 (0)