mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
For injectables, we currently generate a factory function in the
injectable def (prov) that delegates to the factory function in
the factory def (fac). It looks something like this:
```
factory: function(t) { return Svc.fac(t); }
```
The extra wrapper function is unnecessary since the args for
the factory functions are the same. This commit changes the
compiler to generate this instead:
```
factory: Svc.fac
```
Because we are generating less code for each injectable, we
should see some modest code size savings. AIO's main bundle
is about 1 KB smaller.
PR Close #34076
29 lines
527 B
JSON
Executable file
29 lines
527 B
JSON
Executable file
{
|
|
"aio": {
|
|
"master": {
|
|
"uncompressed": {
|
|
"runtime-es2015": 2987,
|
|
"main-es2015": 464973,
|
|
"polyfills-es2015": 52503
|
|
}
|
|
}
|
|
},
|
|
"aio-local": {
|
|
"master": {
|
|
"uncompressed": {
|
|
"runtime-es2015": 2987,
|
|
"main-es2015": 462449,
|
|
"polyfills-es2015": 52503
|
|
}
|
|
}
|
|
},
|
|
"aio-local-viewengine": {
|
|
"master": {
|
|
"uncompressed": {
|
|
"runtime-es2015": 3097,
|
|
"main-es2015": 439352,
|
|
"polyfills-es2015": 52503
|
|
}
|
|
}
|
|
}
|
|
}
|