Skip to content

Commit 5ab629a

Browse files
committed
Make error messaging more clear
1 parent 2ec034f commit 5ab629a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/app/scripts/build.js

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

130+
const info = stats.toJson();
131+
130132
if (stats.hasErrors()) {
131133
console.error('Failed to create a production build. Reason:');
132-
console.error(stats.compilation.errors);
134+
console.error(info.errors);
133135
process.exit(1);
134136
}
135137

138+
if (stats.hasWarnings()) {
139+
console.warn('Warnings in Webpack build:');
140+
console.warn(info.warnings);
141+
}
142+
136143
console.log(chalk.green('Compiled successfully.'));
137144
console.log();
138145

0 commit comments

Comments
 (0)