File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,7 @@ class WebpackCLI {
402
402
403
403
if ( option . configs ) {
404
404
let needNegativeOption = false ;
405
+ let negatedDescription ;
405
406
const mainOptionType = new Set ( ) ;
406
407
407
408
option . configs . forEach ( ( config ) => {
@@ -413,6 +414,7 @@ class WebpackCLI {
413
414
case "boolean" :
414
415
if ( ! needNegativeOption ) {
415
416
needNegativeOption = true ;
417
+ negatedDescription = config . negatedDescription ;
416
418
}
417
419
418
420
mainOptionType . add ( Boolean ) ;
@@ -449,6 +451,7 @@ class WebpackCLI {
449
451
450
452
if ( ! needNegativeOption ) {
451
453
needNegativeOption = hasFalseEnum ;
454
+ negatedDescription = config . negatedDescription ;
452
455
}
453
456
454
457
return enumTypes ;
@@ -467,9 +470,8 @@ class WebpackCLI {
467
470
if ( needNegativeOption ) {
468
471
negativeOption = {
469
472
flags : `--no-${ option . name } ` ,
470
- description : option . negatedDescription
471
- ? option . negatedDescription
472
- : `Negative '${ option . name } ' option.` ,
473
+ description :
474
+ negatedDescription || option . negatedDescription || `Negative '${ option . name } ' option.` ,
473
475
} ;
474
476
}
475
477
} else {
You can’t perform that action at this time.
0 commit comments