Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of *.ngsummary.json

I've just learning about AOT, ngc etc. After running ngc I see plenty of *.ngsummary.json (in src folder, next to *.ts files).

What are they for?

like image 290
dragonfly Avatar asked Nov 07 '22 20:11

dragonfly


1 Answers

This is apparently the new name of NgFactory files used by the AOT compiler. Search for NgFactory on this page Ahead-of-Time Compilation

Extract :

After ngc completes, look for a collection of NgFactory files in the aot folder. The aot folder is the directory specified as genDir in tsconfig-aot.json.

These factory files are essential to the compiled application. Each component factory creates an instance of the component at runtime by combining the original class file and a JavaScript representation of the component's template. Note that the original component class is still referenced internally by the generated factory.

like image 70
Elvynia Avatar answered Nov 15 '22 10:11

Elvynia