File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,6 @@ function isLikelyASyntaxError(message) {
24
24
function formatMessage ( message ) {
25
25
var lines = message . split ( '\n' ) ;
26
26
27
- // line #0 is filename
28
- // line #1 is the main error message
29
- if ( ! lines [ 0 ] || ! lines [ 1 ] ) {
30
- return message ;
31
- }
32
-
33
27
// Remove webpack-specific loader notation from filename.
34
28
// Before:
35
29
// ./~/css-loader!./~/postcss-loader!./src/App.css
@@ -39,6 +33,12 @@ function formatMessage(message) {
39
33
lines [ 0 ] = lines [ 0 ] . substr ( lines [ 0 ] . lastIndexOf ( '!' ) + 1 ) ;
40
34
}
41
35
36
+ // line #0 is filename
37
+ // line #1 is the main error message
38
+ if ( ! lines [ 0 ] || ! lines [ 1 ] ) {
39
+ return lines . join ( '\n' ) ;
40
+ }
41
+
42
42
// Cleans up verbose "module not found" messages for files and packages.
43
43
if ( lines [ 1 ] . indexOf ( 'Module not found: ' ) === 0 ) {
44
44
lines = [
You can’t perform that action at this time.
0 commit comments