mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-18 11:44:05 +08:00
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
This commit is contained in:
parent
e9551f9624
commit
d9420cbe40
@ -158,7 +158,7 @@ export class NgBuildAnalyticsPlugin {
|
|||||||
|
|
||||||
// Count the number of `Component({` strings (case sensitive), which happens in __decorate().
|
// 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 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.
|
// For Ivy we just count ɵcmp.
|
||||||
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true);
|
this._stats.numberOfComponents += countOccurrences(module._source.source(), '.ɵcmp', true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user