angular-cn/packages/compiler
JoostK 45c6360e5a feat(ivy): emit module scope metadata using pure function call (#29598)
Prior to this change, all module metadata would be included in the
`defineNgModule` call that is set as the `ngModuleDef` field of module
types. Part of the metadata is scope information like declarations,
imports and exports that is used for computing the transitive module
scope in JIT environments, preventing those references from being
tree-shaken for production builds.

This change moves the metadata for scope computations to a pure function
call that patches the scope references onto the module type. Because the
function is marked pure, it may be tree-shaken out during production builds
such that references to declarations and exports are dropped, which in turn
allows for tree-shaken any declaration that is not otherwise referenced.

Fixes #28077, FW-1035

PR Close #29598
2019-04-02 16:03:54 -07:00
..
design docs(ivy): remove duplicated words in architecture doc (#27471) 2019-01-14 17:06:42 -08:00
src feat(ivy): emit module scope metadata using pure function call (#29598) 2019-04-02 16:03:54 -07:00
test test(ivy): add tests for component factory projectable node corner cases (#27791) 2019-03-25 13:47:48 -07:00
testing build: turn off dts bundling for packages that still are not supported (#29128) 2019-03-07 10:47:20 -08:00
BUILD.bazel style: enforce buildifier lint on CI (#28186) 2019-02-26 16:57:41 -08:00
compiler.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
index.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
package.json fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734) 2018-10-31 14:15:06 -04:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00
tsconfig-build.json build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00