File tree Expand file tree Collapse file tree
test/statsCases/tree-shaking Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ class FlagDependencyExportsPlugin {
1919 module = queue [ i ] ;
2020
2121 if ( module . providedExports !== true ) {
22- moduleWithExports = false ;
22+ moduleWithExports = module . meta && module . meta . harmonyModule ;
2323 moduleProvidedExports = Array . isArray ( module . providedExports ) ? new Set ( module . providedExports ) : new Set ( ) ;
2424 processDependenciesBlock ( module ) ;
2525 if ( ! moduleWithExports ) {
Original file line number Diff line number Diff line change @@ -641,7 +641,10 @@ class Stats {
641641 const processModuleContent = ( module , prefix ) => {
642642 if ( Array . isArray ( module . providedExports ) ) {
643643 colors . normal ( prefix ) ;
644- colors . cyan ( `[exports: ${ module . providedExports . join ( ", " ) } ]` ) ;
644+ if ( module . providedExports . length === 0 )
645+ colors . cyan ( "[no exports]" ) ;
646+ else
647+ colors . cyan ( `[exports: ${ module . providedExports . join ( ", " ) } ]` ) ;
645648 newline ( ) ;
646649 }
647650 if ( module . usedExports !== undefined ) {
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ bundle.js 7.33 kB 0 [emitted] main
1111 [2] (webpack)/test/statsCases/tree-shaking/unknown.js 0 bytes {0} [built]
1212 [only some exports used: c]
1313 [3] (webpack)/test/statsCases/tree-shaking/index.js 276 bytes {0} [built]
14+ [no exports]
1415 [4] (webpack)/test/statsCases/tree-shaking/reexport-known.js 49 bytes {0} [built]
1516 [exports: a, b]
1617 [only some exports used: a]
You can’t perform that action at this time.
0 commit comments