mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(webpack): print build errors (#8388)
This commit is contained in:
parent
7b20e13c85
commit
e7e7568288
@ -156,11 +156,8 @@ async function compile (compiler: Compiler) {
|
||||
const stats = await new Promise<webpack.Stats>((resolve, reject) => compiler.run((err, stats) => err ? reject(err) : resolve(stats!)))
|
||||
|
||||
if (stats.hasErrors()) {
|
||||
// non-quiet mode: errors will be printed by webpack itself
|
||||
const error = new Error('Nuxt build error')
|
||||
if (nuxt.options.build.quiet === true) {
|
||||
error.stack = stats.toString('errors-only')
|
||||
}
|
||||
throw error
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user