refactor(ivy): export ngcc import prefix into constant (#25406)
PR Close #25406
This commit is contained in:
parent
cdd4c9be63
commit
e77f0fd6e6
9
packages/compiler-cli/src/ngcc/src/constants.ts
Normal file
9
packages/compiler-cli/src/ngcc/src/constants.ts
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
|
||||
export const IMPORT_PREFIX = 'ɵngcc';
|
@ -15,6 +15,7 @@ import * as ts from 'typescript';
|
||||
import {Decorator} from '../../../ngtsc/host';
|
||||
import {ImportManager, translateStatement} from '../../../ngtsc/transform';
|
||||
import {AnalyzedClass, AnalyzedFile} from '../analyzer';
|
||||
import {IMPORT_PREFIX} from '../constants';
|
||||
import {NgccReflectionHost} from '../host/ngcc_host';
|
||||
|
||||
interface SourceMapInfo {
|
||||
@ -70,7 +71,7 @@ export abstract class Renderer {
|
||||
* @param targetPath The absolute path where the rendered file will be written.
|
||||
*/
|
||||
renderFile(file: AnalyzedFile, targetPath: string): RenderResult {
|
||||
const importManager = new ImportManager(false, 'ɵngcc');
|
||||
const importManager = new ImportManager(false, IMPORT_PREFIX);
|
||||
const input = this.extractSourceMap(file.sourceFile);
|
||||
|
||||
const outputText = new MagicString(input.source);
|
||||
|
Loading…
x
Reference in New Issue
Block a user