File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/angular_devkit/build_angular/src/angular-cli-files/utilities Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,9 @@ export function statsToString(json: any, statsConfig: any) {
64
64
const changedChunksStats = json . chunks
65
65
. filter ( ( chunk : any ) => chunk . rendered )
66
66
. map ( ( chunk : any ) => {
67
- const asset = json . assets . filter ( ( x : any ) => x . name == chunk . files [ 0 ] ) [ 0 ] ;
68
- return generateBundleStats ( { ...chunk , size : asset && asset . size } , colors ) ;
67
+ const assets = json . assets . filter ( ( asset : any ) => chunk . files . indexOf ( asset . name ) != - 1 ) ;
68
+ const summedSize = assets . filter ( ( asset : any ) => ! asset . name . endsWith ( ".map" ) ) . reduce ( ( total : number , asset : any ) => { return total + asset . size } , 0 ) ;
69
+ return generateBundleStats ( { ...chunk , size : summedSize } , colors ) ;
69
70
} ) ;
70
71
71
72
const unchangedChunkNumber = json . chunks . length - changedChunksStats . length ;
You can’t perform that action at this time.
0 commit comments