Skip to content
This repository was archived by the owner on Oct 1, 2020. It is now read-only.

Commit 6f16976

Browse files
committed
fix bad looking code
1 parent 4cba2fe commit 6f16976

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ const preprocessor = (options = {}) => {
123123

124124
if (stats.hasErrors()) {
125125
err = new Error('Webpack Compilation Error')
126-
err.message += `\n${jsonStats.errors
126+
127+
const errorsToAppend = jsonStats.errors
127128
// remove stack trace lines since they're useless for debugging
128129
.map((err) => err.replace(/\n\s*at.*/g, '').replace(/From previous event:\n?/g, ''))
129130
// multiple errors separated by newline
130-
.join('\n\n')}`
131+
.join('\n\n')
132+
133+
err.message += `\n${errorsToAppend}`
131134

132135
return rejectWithErr(err)
133136
}

0 commit comments

Comments
 (0)