Skip to content

Commit ceeb6fb

Browse files
committed
fix(@angular-devkit/build-angular): consider ascii_only terser setting when counting components in analytics
1 parent 4191912 commit ceeb6fb

File tree

1 file changed

+4
-0
lines changed
  • packages/angular_devkit/build_angular/plugins/webpack

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ export class NgBuildAnalyticsPlugin {
161161
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);
164+
// for ascii_only true
165+
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.\u0275cmp', true);
164166
}
165167
}
166168

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

0 commit comments

Comments
 (0)