mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-06 21:10:38 +00:00
Lint
This commit is contained in:
parent
01b02a9010
commit
39db08c95b
@ -136,13 +136,14 @@ export default function () {
|
||||
debug(`HTML Files generated in ${duration}s`)
|
||||
|
||||
if (errors.length) {
|
||||
console.error('==== Error report ==== \n' + errors.map( ({type, route, error}) => {
|
||||
const report = errors.map(({ type, route, error }) => {
|
||||
if (type === 'unhandled') {
|
||||
return `Route: '${route}'\n${error.stack}`
|
||||
} else {
|
||||
return `Route: '${route}' thrown an error: \n` + JSON.stringify(error)
|
||||
}
|
||||
}).join('\n\n'))
|
||||
})
|
||||
console.error('==== Error report ==== \n' + report).join('\n\n') // eslint-disable-line no-console
|
||||
}
|
||||
return this
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user