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 bd7393fc68
commit 4d0e175a65
12 changed files with 184 additions and 1367 deletions

View File

@ -1188,8 +1188,8 @@ runInEachFileSystem(() => {
'@angular/common',
'@angular/common/testing',
[
_('/node_modules/tslib'), _('/node_modules/@angular/core'),
_('/node_modules/@angular/common'), _('/node_modules/rxjs')
_('/node_modules/@angular/core'), _('/node_modules/@angular/common'),
_('/node_modules/rxjs')
],
]);
});