Skip to content

Commit

Permalink
Make sure webpack exits with non-zero status when there are errors. F…
Browse files Browse the repository at this point in the history
…ixes #115.
  • Loading branch information
dillonkearns committed Jun 16, 2020
1 parent 53d6c99 commit 36a93d6
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions generator/src/develop.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,35 +98,35 @@ function run({ routes, manifestConfig }) {
})
).run((err, stats) => {
if (err) {
console.error(err);
process.exit(1);
} else if (stats.compilation.errors && stats.compilation.errors.length > 0) {
console.error(stats.compilation.errors);
process.exit(1);
} else {
// done
}
console.log(
stats.toString({
chunks: false, // Makes the build much quieter
colors: true, // Shows colors in the console
// copied from `'minimal'`
all: false,
modules: false,
performance: true,
timings: false,
outputPath: true,
maxModules: 0,
errors: true,
warnings: true,
// our additional options
moduleTrace: false,
errorDetails: false
})
);

console.log(
stats.toString({
chunks: false, // Makes the build much quieter
colors: true, // Shows colors in the console
// copied from `'minimal'`
all: false,
modules: false,
performance: true,
timings: false,
outputPath: true,
maxModules: 0,
errors: true,
warnings: true,
// our additional options
moduleTrace: false,
errorDetails: false
})
);

const duration = roundToOneDecimal(
(stats.endTime - stats.startTime) / 1000
);
console.log(`Duration: ${duration}s`);
const duration = roundToOneDecimal(
(stats.endTime - stats.startTime) / 1000
);
console.log(`Duration: ${duration}s`);
}
});
}

Expand Down

0 comments on commit 36a93d6

Please sign in to comment.