Skip to content

Commit d9420cb

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular-devkit/build-angular): fix numberOfComponents in JIT mode
Current we are always sending `0` as the number of components in JIT mode because ` Component({` doesn't match the component source
1 parent e9551f9 commit d9420cb

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class NgBuildAnalyticsPlugin {
158158

159159
// Count the number of `Component({` strings (case sensitive), which happens in __decorate().
160160
// This does not include View Engine AOT compilation, we use the ngfactory for it.
161-
this._stats.numberOfComponents += countOccurrences(module._source.source(), ' Component({');
161+
this._stats.numberOfComponents += countOccurrences(module._source.source(), 'Component({');
162162
// For Ivy we just count ɵcmp.
163163
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true);
164164
}

0 commit comments

Comments
 (0)