Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(webpack): print build errors #8388

Merged
merged 1 commit into from Oct 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/webpack/src/webpack.ts
Expand Up @@ -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')
}
error.stack = stats.toString('errors-only')
throw error
}

Expand Down