There are different `DebugNode`/`DebugElement` implementations (and associated helper functions) for ViewEngine and Ivy. Additionally, these classes/functions, which are defined inside the `core` package, are imported by the `platform-browser` package. Previously, this code was not tree-shaken as expected in Ivy. #30130 partially addressed the issue, but only for the case where `core` and `platform-browser` end up in the same closure after webpack's scope hoisting. In cases where this is not the case, our webpack/terser based tooling is not capable of tree-shaking it. This commit fixes the problem, by ensuring that the code retained in Ivy mode (due to the cross-package import) does not unnecessarily reference `DebugNode`/`DebugElement`, allowing the code to be tree-shaken away. This results in a 7.6KB reduction in the size of the main angular.io bundle. Jira issue: [FW-1802](https://angular-team.atlassian.net/browse/FW-1802) PR Close #35003
30 lines
527 B
JSON
Executable File
30 lines
527 B
JSON
Executable File
{
|
|
"aio": {
|
|
"master": {
|
|
"uncompressed": {
|
|
"runtime-es2015": 2987,
|
|
"main-es2015": 456581,
|
|
"polyfills-es2015": 52487
|
|
}
|
|
}
|
|
},
|
|
"aio-local": {
|
|
"master": {
|
|
"uncompressed": {
|
|
"runtime-es2015": 2987,
|
|
"main-es2015": 448956,
|
|
"polyfills-es2015": 52487
|
|
}
|
|
}
|
|
},
|
|
"aio-local-viewengine": {
|
|
"master": {
|
|
"uncompressed": {
|
|
"runtime-es2015": 3097,
|
|
"main-es2015": 427017,
|
|
"polyfills-es2015": 52487
|
|
}
|
|
}
|
|
}
|
|
}
|