File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,10 @@ class ModuleBuildError extends WebpackError {
1212 let message = "Module build failed" ;
1313 let details = undefined ;
1414 if ( from ) {
15- message += ` (from ${ from } )` ;
15+ message += ` (from ${ from } ):\n` ;
16+ } else {
17+ message += ": " ;
1618 }
17- message += ": " ;
1819 if ( err !== null && typeof err === "object" ) {
1920 if ( typeof err . stack === "string" && err . stack ) {
2021 const stack = cutOffLoaderExecution ( err . stack ) ;
Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ class ModuleError extends WebpackError {
1111 constructor ( module , err , { from = null } = { } ) {
1212 let message = "Module Error" ;
1313 if ( from ) {
14- message += ` (from ${ from } )` ;
14+ message += ` (from ${ from } ):\n` ;
15+ } else {
16+ message += ": " ;
1517 }
1618 if ( err && typeof err === "object" && err . message ) {
17- message += `:\n ${ err . message } ` ;
19+ message += err . message ;
1820 } else if ( err ) {
19- message += `:\n ${ err } ` ;
21+ message += err ;
2022 }
2123 super ( message ) ;
2224 this . name = "ModuleError" ;
Original file line number Diff line number Diff line change @@ -11,12 +11,14 @@ class ModuleWarning extends WebpackError {
1111 constructor ( module , warning , { from = null } = { } ) {
1212 let message = "Module Warning" ;
1313 if ( from ) {
14- message += ` (from ${ from } )` ;
14+ message += ` (from ${ from } ):\n` ;
15+ } else {
16+ message += ": " ;
1517 }
1618 if ( warning && typeof warning === "object" && warning . message ) {
17- message += `:\n ${ warning . message } ` ;
19+ message += warning . message ;
1820 } else if ( warning ) {
19- message += `:\n ${ warning } ` ;
21+ message += warning ;
2022 }
2123 super ( message ) ;
2224 this . name = "ModuleWarning" ;
You can’t perform that action at this time.
0 commit comments