fix(ivy): ngcc - render decorators in UMD and CommonJS bundles correctly (#31614)

In #31426 a fix was implemented to render namespaced decorator imports
correctly, however it turns out that the fix only worked when decorator
information was extracted from static properties, not when using
`__decorate` calls.

This commit fixes the issue by creating the decorator metadata with the
full decorator expression, instead of only its name.

Closes #31394

PR Close #31614
This commit is contained in:
JoostK
2019-07-27 15:14:55 +02:00
committed by Andrew Kushnir
parent 80f290e301
commit fc6f48185c
6 changed files with 146 additions and 2 deletions

View File

@ -957,7 +957,7 @@ export class Esm2015ReflectionHost extends TypeScriptReflectionHost implements N
return {
name: decoratorIdentifier.text,
identifier: decoratorIdentifier,
identifier: decoratorExpression,
import: this.getImportOfIdentifier(decoratorIdentifier),
node: call,
args: Array.from(call.arguments),