File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1307,7 +1307,9 @@ class HtmlWebpackPlugin {
1307
1307
1308
1308
if ( "error" in templateResult ) {
1309
1309
compilation . errors . push (
1310
- prettyError ( templateResult . error , compiler . context ) . toString ( ) ,
1310
+ new Error (
1311
+ prettyError ( templateResult . error , compiler . context ) . toString ( ) ,
1312
+ ) ,
1311
1313
) ;
1312
1314
}
1313
1315
@@ -1497,7 +1499,9 @@ class HtmlWebpackPlugin {
1497
1499
. catch ( ( err ) => {
1498
1500
// In case anything went wrong the promise is resolved
1499
1501
// with the error message and an error is logged
1500
- compilation . errors . push ( prettyError ( err , compiler . context ) . toString ( ) ) ;
1502
+ compilation . errors . push (
1503
+ new Error ( prettyError ( err , compiler . context ) . toString ( ) ) ,
1504
+ ) ;
1501
1505
return this . options . showErrors
1502
1506
? prettyError ( err , compiler . context ) . toHtml ( )
1503
1507
: "ERROR" ;
You can’t perform that action at this time.
0 commit comments