fix(ivy): reexport compileNgModuleFactory__POST_NGCC__ to prevent DCE in FESM (#26071)
While creating FESM files, rollup usually drops all unused symbols. All *__POST_NGCC__ are unused unless ngcc rewires stuff. To prevent this DCE we reexport them as private symbols. If ngcc is not used, these symbols will be dropped when we optimize an application bundle. PR Close #26071
This commit is contained in:
parent
3cce4afa0d
commit
9953fe7c00
|
@ -43,7 +43,7 @@ function compileNgModuleFactory__PRE_NGCC__<M>(
|
|||
return compiler.compileModuleAsync(moduleType);
|
||||
}
|
||||
|
||||
function compileNgModuleFactory__POST_NGCC__<M>(
|
||||
export function compileNgModuleFactory__POST_NGCC__<M>(
|
||||
injector: Injector, options: CompilerOptions,
|
||||
moduleType: Type<M>): Promise<NgModuleFactory<M>> {
|
||||
ngDevMode && assertNgModuleType(moduleType);
|
||||
|
|
|
@ -175,6 +175,9 @@ export {
|
|||
// performed by rollup while it's creating fesm files.
|
||||
//
|
||||
// no code actually imports these symbols from the @angular/core entry point
|
||||
export {
|
||||
compileNgModuleFactory__POST_NGCC__ as ɵcompileNgModuleFactory__POST_NGCC__
|
||||
} from './application_ref';
|
||||
export {
|
||||
R3_COMPILE_COMPONENT__POST_NGCC__ as ɵR3_COMPILE_COMPONENT__POST_NGCC__,
|
||||
R3_COMPILE_DIRECTIVE__POST_NGCC__ as ɵR3_COMPILE_DIRECTIVE__POST_NGCC__,
|
||||
|
|
Loading…
Reference in New Issue