Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): fix numberOfComponents in JIT mode
Browse files Browse the repository at this point in the history
Current we are always sending `0` as the number of components in JIT mode because ` Component({` doesn't match the component source

(cherry picked from commit d9420cb)
  • Loading branch information
alan-agius4 authored and dgp1130 committed Nov 14, 2019
1 parent c35f580 commit 2dbaf79
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export class NgBuildAnalyticsPlugin {

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

0 comments on commit 2dbaf79

Please sign in to comment.