angular/packages/platform-browser/src
George Kalpakas 23c0147f25 fix(ivy): ensure DebugNode/DebugElement are tree-shakeable in Ivy (#35003)
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
2020-01-28 15:57:58 -08:00
..
browser refactor(core): move Meta methods that only have one version from DomAdapter (#32408) 2019-09-03 11:59:39 -07:00
dom fix(ivy): ensure DebugNode/DebugElement are tree-shakeable in Ivy (#35003) 2020-01-28 15:57:58 -08:00
security perf(core): make sanitization tree-shakable in Ivy mode (#31934) 2019-08-15 10:30:12 -07:00
browser.ts refactor: remove unused imports (#35003) 2020-01-28 15:57:58 -08:00
platform-browser.externs.js fix: create proper externs so that closure does not clobber e.g. ng for internal variables (#19423) 2017-09-26 15:02:33 -07:00
platform-browser.ts feat(ivy): make Hammer support tree-shakable (#32203) 2019-08-21 11:43:51 -07:00
private_export.ts perf(core): Make PlatformLocation tree-shakable (#32154) 2019-08-29 21:51:56 -07:00
version.ts docs: update platform-browser with @publicApi tags (#26595) 2018-10-19 14:35:52 -07:00