angular-cn/packages/compiler-cli
JoostK 1f73af77a7 refactor(compiler-cli): use `ngDevMode` guard for `setClassMetadata` call (#39987)
Prior to this change, the `setClassMetadata` call would be invoked
inside of an IIFE that was marked as pure. This allows the call to be
tree-shaken away in production builds, as the `setClassMetadata` call
is only present to make the original class metadata available to the
testing infrastructure. The pure marker is problematic, though, as the
`setClassMetadata` call does in fact have the side-effect of assigning
the metadata into class properties. This has worked under the assumption
that only build optimization tools perform tree-shaking, however modern
bundlers are also able to elide calls that have been marked pure so this
assumption does no longer hold. Instead, an `ngDevMode` guard is used
which still allows the call to be elided but only by tooling that is
configured to consider `ngDevMode` as constant `false` value.

PR Close #39987
2020-12-10 13:23:13 -08:00
..
integrationtest refactor(core): add top 10 runtime error codes (#39188) 2020-10-28 10:05:01 -07:00
linker refactor(compiler-cli): reformat directive/pipe metadata extraction (#39961) 2020-12-08 12:02:00 -08:00
ngcc refactor(compiler-cli): use `ngDevMode` guard for `setClassMetadata` call (#39987) 2020-12-10 13:23:13 -08:00
src refactor(compiler-cli): use `ngDevMode` guard for `setClassMetadata` call (#39987) 2020-12-10 13:23:13 -08:00
test refactor(compiler-cli): use `ngDevMode` guard for `setClassMetadata` call (#39987) 2020-12-10 13:23:13 -08:00
BUILD.bazel build: upgrade angular build, integration/bazel and @angular/bazel package to rule_nodejs 2.2.0 (#39182) 2020-10-08 11:54:59 -07:00
index.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
package.json build: support building with TypeScript 4.1 (#39571) 2020-11-25 11:10:01 -08:00
tsconfig-build.json build: reference zone.js from source directly instead of npm. (#33046) 2019-11-06 00:48:34 +00:00
tsconfig.json perf(ivy): ngcc - only find dependencies when targeting a single entry-point (#30525) 2019-07-09 09:40:46 -07:00