File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,10 @@ class Stats {
368368 } ) . sort ( ( a , b ) => a . moduleId - b . moduleId ) ;
369369 }
370370 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 ;
372375 }
373376 if ( showProvidedExports ) {
374377 obj . providedExports = Array . isArray ( module . buildMeta . providedExports ) ? module . buildMeta . providedExports : null ;
@@ -716,9 +719,13 @@ class Stats {
716719 if ( module . usedExports !== undefined ) {
717720 if ( module . usedExports !== true ) {
718721 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 )
720725 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 ) )
722729 colors . cyan ( `[only some exports used: ${ module . usedExports . join ( ", " ) } ]` ) ;
723730 newline ( ) ;
724731 }
You can’t perform that action at this time.
0 commit comments