refactor(ngcc): share code between CommonJsReflectionHost
and UmdReflectionHost
(#34512)
While different, CommonJS and UMD have a lot in common regarding the their exports are constructed. Therefore, there was some code duplication between `CommonJsReflectionHost` and `UmdReflectionHost`. This commit extracts some of the common bits into a separate file as helpers to allow reusing the code in both `ReflectionHost`s. PR Close #34512
This commit is contained in:

committed by
Alex Rickabaugh

parent
d5fd742763
commit
17d5e2bc99
@ -11,7 +11,7 @@ import MagicString from 'magic-string';
|
||||
import {Reexport} from '../../../src/ngtsc/imports';
|
||||
import {Import, ImportManager} from '../../../src/ngtsc/translator';
|
||||
import {ExportInfo} from '../analysis/private_declarations_analyzer';
|
||||
import {isRequireCall} from '../host/commonjs_host';
|
||||
import {isRequireCall} from '../host/commonjs_umd_utils';
|
||||
import {NgccReflectionHost} from '../host/ngcc_host';
|
||||
import {Esm5RenderingFormatter} from './esm5_rendering_formatter';
|
||||
import {stripExtension} from './utils';
|
||||
|
Reference in New Issue
Block a user