Skip to content

Commit

Permalink
fix(@angular-devkit/build-angular): consider ascii_only terser settin…
Browse files Browse the repository at this point in the history
…g when counting components in analytics
  • Loading branch information
alan-agius4 committed Sep 3, 2020
1 parent 4191912 commit ceeb6fb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ export class NgBuildAnalyticsPlugin {
this._stats.numberOfComponents += countOccurrences(module._source.source(), 'Component({');
// For Ivy we just count ɵcmp.
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true);
// for ascii_only true
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.\u0275cmp', true);
}
}

Expand All @@ -172,6 +174,8 @@ export class NgBuildAnalyticsPlugin {
// Count the number of `.ɵccf(` strings (case sensitive). They're calls to components
// factories.
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵccf(');
// for ascii_only true
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.\u0275ccf(');
}
}

Expand Down

0 comments on commit ceeb6fb

Please sign in to comment.