Skip to content

Commit 33fd7e0

Browse files
alxhubbenlesh
authored andcommitted
fix(ivy): export NgModuleFactory via r3_symbols for core factories (angular#25392)
When @angular/core is compiled by ngtsc, a factory file is generated for ApplicationModule, that is currently invalid because r3_symbols does not export NgModuleFactory. This change fixes that issue and ensures the generated ngfactory file for @angular/core is valid. PR Close angular#25392
1 parent 2befc65 commit 33fd7e0

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

packages/compiler-cli/src/ngtsc/transform/src/translator.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ const CORE_SUPPORTED_SYMBOLS = new Set<string>([
4646
'ɵInjectableDef',
4747
'ɵInjectorDef',
4848
'ɵNgModuleDef',
49+
'ɵNgModuleFactory',
4950
]);
5051

5152
export class ImportManager {

packages/core/src/r3_symbols.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export {InjectableDef as ɵInjectableDef, InjectorDef as ɵInjectorDef, defineIn
2323
export {inject} from './di/injector';
2424
export {NgModuleDef as ɵNgModuleDef} from './metadata/ng_module';
2525
export {defineNgModule as ɵdefineNgModule} from './render3/definition';
26-
26+
export {NgModuleFactory as ɵNgModuleFactory} from './render3/ng_module_ref';
2727

2828
/**
2929
* The existence of this constant (in this particular file) informs the Angular compiler that the

packages/core/test/bundling/todo/bundle.golden_symbols.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@
198198
"name": "ViewEncapsulation$1"
199199
},
200200
{
201-
"name": "ViewRef$1"
201+
"name": "ViewRef"
202202
},
203203
{
204204
"name": "_CLEAN_PROMISE"

0 commit comments

Comments
 (0)