Commit d5caafb8 authored by Tim Neutkens's avatar Tim Neutkens

Log original error

parent a97c15d3
...@@ -52,18 +52,22 @@ function runCompiler (compiler) { ...@@ -52,18 +52,22 @@ function runCompiler (compiler) {
return reject(err) return reject(err)
} }
const jsonStats = stats.toJson({ warnings: true, errors: true }) let buildFailed = false
for (const stat of stats.stats) {
for (const error of stat.compilation.errors) {
buildFailed = true
console.error('ERROR', error)
console.error('ORIGINAL ERROR', error.error)
}
if (jsonStats.errors.length > 0) { for (const warning of stat.compilation.warnings) {
console.log() buildFailed = true
console.log(...jsonStats.warnings) console.warn('WARNING', warning)
console.error(...jsonStats.errors) }
return reject(new Error('Soft webpack errors'))
} }
if (jsonStats.warnings.length > 0) { if (buildFailed) {
console.log() return reject(new Error('Webpack errors'))
console.log(...jsonStats.warnings)
} }
resolve() resolve()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment