2017-11-18 15:26:33 -05:00
|
|
|
{
|
2018-01-05 19:15:14 -05:00
|
|
|
"cli-hello-world": {
|
|
|
|
"master": {
|
|
|
|
"uncompressed": {
|
|
|
|
"inline": 1447,
|
feat: change @Injectable() to support tree-shakeable tokens (#22005)
This commit bundles 3 important changes, with the goal of enabling tree-shaking
of services which are never injected. Ordinarily, this tree-shaking is prevented
by the existence of a hard dependency on the service by the module in which it
is declared.
Firstly, @Injectable() is modified to accept a 'scope' parameter, which points
to an @NgModule(). This reverses the dependency edge, permitting the module to
not depend on the service which it "provides".
Secondly, the runtime is modified to understand the new relationship created
above. When a module receives a request to inject a token, and cannot find that
token in its list of providers, it will then look at the token for a special
ngInjectableDef field which indicates which module the token is scoped to. If
that module happens to be in the injector, it will behave as if the token
itself was in the injector to begin with.
Thirdly, the compiler is modified to read the @Injectable() metadata and to
generate the special ngInjectableDef field as part of TS compilation, using the
PartialModules system.
Additionally, this commit adds several unit and integration tests of various
flavors to test this change.
PR Close #22005
2018-02-02 13:33:48 -05:00
|
|
|
"main": 159944,
|
2018-01-10 19:45:31 -05:00
|
|
|
"polyfills": 59179
|
2018-01-05 19:15:14 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"hello_world__closure": {
|
|
|
|
"master": {
|
|
|
|
"uncompressed": {
|
feat: change @Injectable() to support tree-shakeable tokens (#22005)
This commit bundles 3 important changes, with the goal of enabling tree-shaking
of services which are never injected. Ordinarily, this tree-shaking is prevented
by the existence of a hard dependency on the service by the module in which it
is declared.
Firstly, @Injectable() is modified to accept a 'scope' parameter, which points
to an @NgModule(). This reverses the dependency edge, permitting the module to
not depend on the service which it "provides".
Secondly, the runtime is modified to understand the new relationship created
above. When a module receives a request to inject a token, and cannot find that
token in its list of providers, it will then look at the token for a special
ngInjectableDef field which indicates which module the token is scoped to. If
that module happens to be in the injector, it will behave as if the token
itself was in the injector to begin with.
Thirdly, the compiler is modified to read the @Injectable() metadata and to
generate the special ngInjectableDef field as part of TS compilation, using the
PartialModules system.
Additionally, this commit adds several unit and integration tests of various
flavors to test this change.
PR Close #22005
2018-02-02 13:33:48 -05:00
|
|
|
"bundle": 105779
|
2018-01-05 19:15:14 -05:00
|
|
|
}
|
|
|
|
}
|
2018-01-16 11:17:47 -05:00
|
|
|
},
|
|
|
|
"hello_world__render3__closure": {
|
|
|
|
"master": {
|
|
|
|
"uncompressed": {
|
2018-01-25 09:32:21 -05:00
|
|
|
"bundle": 8153
|
2018-01-16 11:17:47 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"hello_world__render3__rollup": {
|
|
|
|
"master": {
|
|
|
|
"uncompressed": {
|
2018-02-02 05:09:42 -05:00
|
|
|
"bundle": 10034
|
2018-01-16 11:17:47 -05:00
|
|
|
}
|
|
|
|
}
|
2018-01-25 19:43:29 -05:00
|
|
|
},
|
|
|
|
"hello_world__render3__cli": {
|
|
|
|
"master": {
|
|
|
|
"uncompressed": {
|
|
|
|
"inline": 1447,
|
|
|
|
"main": 40513,
|
|
|
|
"polyfills": 61085
|
|
|
|
}
|
|
|
|
}
|
2018-01-05 19:15:14 -05:00
|
|
|
}
|
2018-02-02 05:09:42 -05:00
|
|
|
}
|