fix(core): reenable decorator downleveling for Angular npm packages (#37317)

In #37221 we disabled tsickle passes from transforming the tsc output that is used to publish all
Angular framework and components packages (@angular/*).

This change however revealed a bug in the ngc that caused __decorate and __metadata calls to still
be emitted in the JS code even though we don't depend on them.

Additionally it was these calls that caused code in @angular/material packages to fail at runtime
due to circular dependency in the emitted decorator code documeted as
https://github.com/microsoft/TypeScript/issues/27519.

This change partially rolls back #37221 by reenabling the decorator to static fields (static
properties) downleveling.

This is just a temporary workaround while we are also fixing root cause in `ngc` - tracked as
FW-2199.

Resolves FW-2198.
Related to FW-2196

PR Close #37317
This commit is contained in:
Igor Minar
2020-05-27 14:09:01 -07:00
committed by Matias Niemelä
parent 82761ec50e
commit d16a7f3ecc
12 changed files with 184 additions and 1367 deletions

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/animations";
import "@angular/core";

View File

@ -1,3 +1 @@
import "tslib";
import "@angular/core";

View File

@ -1,7 +1,5 @@
import "rxjs";
import "tslib";
import "rxjs/operators";
const __globalThis = "undefined" !== typeof globalThis && globalThis;

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/core";
import "@angular/common";

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/common";
import "@angular/core";

View File

@ -1,5 +1,3 @@
import "tslib";
import "@angular/common";
import "@angular/core";