mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-18 14:41:25 +00:00
fix: avoid pretty-error mutating traces
This commit is contained in:
parent
8868a4e8f4
commit
61232a61e6
@ -1,21 +1,7 @@
|
|||||||
const PrettyError = require('pretty-error')
|
const PrettyError = require('pretty-error')
|
||||||
|
|
||||||
// Start default instance
|
// Start default instance
|
||||||
const pe = PrettyError.start()
|
const pe = new PrettyError()
|
||||||
|
|
||||||
// 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()
|
|
||||||
|
|
||||||
// Console error unhandled promises
|
// Console error unhandled promises
|
||||||
process.on('unhandledRejection', function (err) {
|
process.on('unhandledRejection', function (err) {
|
||||||
|
Loading…
Reference in New Issue
Block a user