From 11600255fb5ab1105852118aa44262163f507e1a Mon Sep 17 00:00:00 2001 From: JoostK Date: Mon, 3 Dec 2018 22:10:28 +0100 Subject: [PATCH] fix(ivy): prevent DCE of __POST_R3__ symbols (#27438) While creating FESM files, rollup usually drops all unused symbols. All *__POST_R3__ 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 #27438 --- packages/core/src/core_render3_private_export.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/core/src/core_render3_private_export.ts b/packages/core/src/core_render3_private_export.ts index 8e91c4297b..634724552d 100644 --- a/packages/core/src/core_render3_private_export.ts +++ b/packages/core/src/core_render3_private_export.ts @@ -193,6 +193,9 @@ export { export { SWITCH_COMPILE_NGMODULE__POST_R3__ as ɵSWITCH_COMPILE_NGMODULE__POST_R3__, } from './metadata/ng_module'; +export { + getDebugNode__POST_R3__ as ɵgetDebugNode__POST_R3__, +} from './debug/debug_node'; export { SWITCH_COMPILE_INJECTABLE__POST_R3__ as ɵSWITCH_COMPILE_INJECTABLE__POST_R3__, } from './di/injectable'; @@ -202,6 +205,12 @@ export { export { SWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__ as ɵSWITCH_CHANGE_DETECTOR_REF_FACTORY__POST_R3__, } from './change_detection/change_detector_ref'; +export { + Compiler_compileModuleSync__POST_R3__ as ɵCompiler_compileModuleSync__POST_R3__, + Compiler_compileModuleAsync__POST_R3__ as ɵCompiler_compileModuleAsync__POST_R3__, + Compiler_compileModuleAndAllComponentsSync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsSync__POST_R3__, + Compiler_compileModuleAndAllComponentsAsync__POST_R3__ as ɵCompiler_compileModuleAndAllComponentsAsync__POST_R3__, +} from './linker/compiler'; export { SWITCH_ELEMENT_REF_FACTORY__POST_R3__ as ɵSWITCH_ELEMENT_REF_FACTORY__POST_R3__, } from './linker/element_ref';