forked from angular/angular
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ivy): ensure ngcc compiles
@angular/core
with correct internal …
…imports (angular#26236) PR Close angular#26236
- Loading branch information
1 parent
807070f
commit 83302d1
Showing
20 changed files
with
357 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/compiler-cli/src/ngcc/src/rendering/ngcc_import_manager.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
|
||
/** | ||
* @license | ||
* Copyright Google Inc. All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://angular.io/license | ||
*/ | ||
|
||
import {ImportManager} from '../../../ngtsc/translator'; | ||
|
||
export class NgccImportManager extends ImportManager { | ||
constructor(private isFlat: boolean, isCore: boolean, prefix?: string) { super(isCore, prefix); } | ||
|
||
generateNamedImport(moduleName: string, symbol: string): string|null { | ||
if (this.isFlat && this.isCore && moduleName === '@angular/core') { | ||
return null; | ||
} | ||
return super.generateNamedImport(moduleName, symbol); | ||
} | ||
} |
Oops, something went wrong.