fix: avoid pretty-error mutating traces

This commit is contained in:
Pooya Parsa 2017-12-29 15:16:31 +03:30
parent 8868a4e8f4
commit 61232a61e6

View File

@ -1,21 +1,7 @@
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')
// Skip node internals
pe.skip((traceLine, lineNumber) => {
if (!traceLine.file) {
return true
}
})
pe.skipNodeFiles()
const pe = new PrettyError()
// Console error unhandled promises
process.on('unhandledRejection', function (err) {