File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,10 @@ class Stats {
368
368
} ) . sort ( ( a , b ) => a . moduleId - b . moduleId ) ;
369
369
}
370
370
if ( showUsedExports ) {
371
- obj . usedExports = module . used ? module . usedExports : false ;
371
+ if ( module . used === true )
372
+ obj . usedExports = module . usedExports ;
373
+ else if ( module . used === false )
374
+ obj . usedExports = false ;
372
375
}
373
376
if ( showProvidedExports ) {
374
377
obj . providedExports = Array . isArray ( module . buildMeta . providedExports ) ? module . buildMeta . providedExports : null ;
@@ -716,9 +719,13 @@ class Stats {
716
719
if ( module . usedExports !== undefined ) {
717
720
if ( module . usedExports !== true ) {
718
721
colors . normal ( prefix ) ;
719
- if ( module . usedExports === false || module . usedExports . length === 0 )
722
+ if ( module . usedExports === null )
723
+ colors . cyan ( "[used exports unknown]" ) ;
724
+ else if ( module . usedExports === false )
720
725
colors . cyan ( "[no exports used]" ) ;
721
- else
726
+ else if ( Array . isArray ( module . usedExports ) && module . usedExports . length === 0 )
727
+ colors . cyan ( "[no exports used]" ) ;
728
+ else if ( Array . isArray ( module . usedExports ) )
722
729
colors . cyan ( `[only some exports used: ${ module . usedExports . join ( ", " ) } ]` ) ;
723
730
newline ( ) ;
724
731
}
You can’t perform that action at this time.
0 commit comments