Skip to content

Commit 9c39956

Browse files
committed
Add error checking in build
1 parent d8339a0 commit 9c39956

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/app/scripts/build.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ function build(previousSizeMap) {
127127
process.exit(1);
128128
}
129129

130+
if (stats.hasErrors()) {
131+
console.error('Failed to create a production build. Reason:');
132+
console.error(stats.compilation.errors);
133+
process.exit(1);
134+
}
135+
130136
console.log(chalk.green('Compiled successfully.'));
131137
console.log();
132138

0 commit comments

Comments
 (0)