mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Log out stats.errors and err object when build fails
This commit is contained in:
parent
14668aa3ee
commit
771e494a88
|
@ -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 })
|
||||
|
||||
|
|
Loading…
Reference in a new issue