fix(ivy): use ReflectionHost
in AbsoluteModuleStrategy
(#30200)
The AbsoluteModuleStrategy in ngtsc assumed that the source code is formatted as TypeScript with regards to module exports. In ngcc this is not always the case, so this commit changes `AbsoluteModuleStrategy` so that it relies upon a `ReflectionHost` to compute the exports of a module. PR Close #30200
This commit is contained in:

committed by
Jason Aden

parent
02523debe5
commit
76391f8999
@ -70,7 +70,8 @@ export class DecorationAnalyzer {
|
||||
fullMetaReader = new CompoundMetadataReader([this.metaRegistry, this.dtsMetaReader]);
|
||||
refEmitter = new ReferenceEmitter([
|
||||
new LocalIdentifierStrategy(),
|
||||
new AbsoluteModuleStrategy(this.program, this.typeChecker, this.options, this.host),
|
||||
new AbsoluteModuleStrategy(
|
||||
this.program, this.typeChecker, this.options, this.host, this.reflectionHost),
|
||||
// TODO(alxhub): there's no reason why ngcc needs the "logical file system" logic here, as ngcc
|
||||
// projects only ever have one rootDir. Instead, ngcc should just switch its emitted import
|
||||
// based on whether a bestGuessOwningModule is present in the Reference.
|
||||
|
Reference in New Issue
Block a user