Skip to content

Commit 3e19c84

Browse files
alan-agius4clydin
authored andcommitted
fix(@angular-devkit/build-angular): avoid collect stats from chunks with no files
This commit updates to bundle stats logic to skip checking chunks with no files. Closes #23717 (cherry picked from commit 7de9b47)
1 parent a37f0a5 commit 3e19c84

File tree

1 file changed

+1
-1
lines changed
  • packages/angular_devkit/build_angular/src/webpack/plugins

1 file changed

+1
-1
lines changed

packages/angular_devkit/build_angular/src/webpack/plugins/analytics.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ export class NgBuildAnalyticsPlugin {
172172
protected _collectBundleStats(compilation: Compilation) {
173173
const chunkAssets = new Set<string>();
174174
for (const chunk of compilation.chunks) {
175-
if (!chunk.rendered) {
175+
if (!chunk.rendered || chunk.files.size === 0) {
176176
continue;
177177
}
178178

0 commit comments

Comments
 (0)