Log out stats.errors and err object when build fails

This commit is contained in:
Tim Neutkens 2018-11-04 22:16:09 +01:00
parent 14668aa3ee
commit 771e494a88

View file

@ -46,7 +46,11 @@ function runCompiler (compiler) {
return new Promise(async (resolve, reject) => {
const webpackCompiler = await webpack(await compiler)
webpackCompiler.run((err, stats) => {
if (err) return reject(err)
if (err) {
console.log({...err})
console.log(...stats.errors)
return reject(err)
}
const jsonStats = stats.toJson({ warnings: true, errors: true })