This repository was archived by the owner on Jul 27, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,15 @@ function cleanStackTrace(message) {
1111
1212function cleanMessage ( message ) {
1313 return message
14- // match until the last semicolon followed by a space
15- // this should match
16- // linux => "(SyntaxError: )Unexpected token (5:11)"
17- // windows => "(SyntaxError: C:/projects/index.js: )Unexpected token (5:11)"
14+ // match until the last semicolon followed by a space
15+ // this should match
16+ // linux => "(SyntaxError: )Unexpected token (5:11)"
17+ // windows => "(SyntaxError: C:/projects/index.js: )Unexpected token (5:11)"
1818 . replace ( / ^ M o d u l e b u i l d f a i l e d .* : \s / , 'Syntax Error: ' )
19- . replace ( / ^ M o d u l e B u i l d E r r o r .* : \s / , 'Syntax Error: ' ) ;
19+ // remove mini-css-extract-plugin loader tracing errors
20+ . replace ( / ^ S y n t a x E r r o r : M o d u l e B u i l d E r r o r : .* : \s / , '' )
21+ // remove babel extra wording
22+ . replace ( 'SyntaxError: ' , '' ) ;
2023}
2124
2225function isBabelSyntaxError ( e ) {
@@ -36,4 +39,4 @@ function transform(error) {
3639 return error ;
3740}
3841
39- module . exports = transform ;
42+ module . exports = transform ;
You can’t perform that action at this time.
0 commit comments