fix(ivy): restore @fileoverview annotations for Closure (#28723)
Prior to this change, the @fileoverview annotations added by users in source files or by tsickle during compilation might have change a location due to the fact that Ngtsc may prepend extra imports or constants. As a result, the output file is considered invalid by Closure (misplaced @fileoverview annotation). In order to resolve the problem we relocate @fileoverview annotation if we detect that its host node shifted. PR Close #28723
This commit is contained in:

committed by
Igor Minar

parent
58436fd81a
commit
be121bba85
@ -272,8 +272,9 @@ export class NgtscProgram implements api.Program {
|
||||
};
|
||||
|
||||
const customTransforms = opts && opts.customTransformers;
|
||||
const beforeTransforms =
|
||||
[ivyTransformFactory(compilation, this.reflector, this.importRewriter, this.isCore)];
|
||||
const beforeTransforms = [ivyTransformFactory(
|
||||
compilation, this.reflector, this.importRewriter, this.isCore,
|
||||
this.closureCompilerEnabled)];
|
||||
const afterDeclarationsTransforms = [declarationTransformFactory(compilation)];
|
||||
|
||||
if (this.factoryToSourceInfo !== null) {
|
||||
|
Reference in New Issue
Block a user