mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
fix: throw error when building failed in quiet mode (#6075)
This commit is contained in:
parent
1f10f40a1f
commit
26a62596c0
@ -146,12 +146,12 @@ export class WebpackBundler {
|
|||||||
const stats = await compiler.run()
|
const stats = await compiler.run()
|
||||||
|
|
||||||
if (stats.hasErrors()) {
|
if (stats.hasErrors()) {
|
||||||
|
// non-quiet mode: errors will be printed by webpack itself
|
||||||
|
const error = new Error('Nuxt build error')
|
||||||
if (options.build.quiet === true) {
|
if (options.build.quiet === true) {
|
||||||
return Promise.reject(stats.toString(options.build.stats))
|
error.stack = stats.toString('errors-only')
|
||||||
}
|
}
|
||||||
|
throw error
|
||||||
// Actual error will be printed by webpack
|
|
||||||
throw new Error('Nuxt Build Error')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Await for renderer to load resources (programmatic, tests and generate)
|
// Await for renderer to load resources (programmatic, tests and generate)
|
||||||
|
Loading…
Reference in New Issue
Block a user