mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-06 06:03:58 +00:00
21 lines
433 B
JavaScript
21 lines
433 B
JavaScript
const PrettyError = require('pretty-error')
|
|
|
|
// Start default instance
|
|
const pe = PrettyError.start()
|
|
|
|
// Configure prettyError instance
|
|
pe.skipPackage('regenerator-runtime')
|
|
pe.skipPackage('babel-runtime')
|
|
pe.skipPackage('core-js')
|
|
pe.skipNodeFiles()
|
|
|
|
// Console error unhandled promises
|
|
process.on('unhandledRejection', function (err) {
|
|
/* eslint-disable no-console */
|
|
console.log(pe.render(err))
|
|
})
|
|
|
|
module.exports = {
|
|
pe
|
|
}
|