fix(compiler): always use relative paths to refer to generated code
Previously we generated imports like `@angular/material/index.ngfactory`, which doesn’t make sense as we don’t ship generated code on npm Closes #20031
This commit is contained in:

committed by
Matias Niemelä

parent
85e95cc32b
commit
fd37f3fbab
@ -192,7 +192,8 @@ export class TsCompilerAotCompilerTypeCheckHostAdapter implements ts.CompilerHos
|
||||
const containingFilePackageName = getPackageName(containingFile);
|
||||
|
||||
let moduleName: string;
|
||||
if (importedFilePackagName === containingFilePackageName) {
|
||||
if (importedFilePackagName === containingFilePackageName ||
|
||||
GENERATED_FILES.test(originalImportedFile)) {
|
||||
const rootedContainingFile = relativeToRootDirs(containingFile, this.rootDirs);
|
||||
const rootedImportedFile = relativeToRootDirs(importedFile, this.rootDirs);
|
||||
|
||||
|
Reference in New Issue
Block a user