fix(ivy): prevent ngcc from referencing missing ɵsetClassMetadata (#27055)
When ngtsc compiles @angular/core, it rewrites core imports to the r3_symbols.ts file that exposes all internal symbols under their external name. When creating the FESM bundle, the r3_symbols.ts file causes the external symbol names to be rewritten to their internal name. Under ngcc compilations of FESM bundles, the indirection of r3_symbols.ts is no longer in place such that the external names are retained in the bundle. Previously, the external name `ɵdefineNgModule` was explicitly declared internally to resolve this issue, but the recently added `setClassMetadata` was not declared as such, causing runtime errors. Instead of relying on the r3_symbols.ts file to perform the rewrite of the external modules to their internal variants, the translation is moved into the `ImportManager` during the compilation itself. This avoids the need for providing the external name manually. PR Close #27055
This commit is contained in:
@ -1420,8 +1420,5 @@
|
||||
},
|
||||
{
|
||||
"name": "wtfLeave"
|
||||
},
|
||||
{
|
||||
"name": "ɵdefineNgModule"
|
||||
}
|
||||
]
|
@ -2704,8 +2704,5 @@
|
||||
},
|
||||
{
|
||||
"name": "wtfLeave"
|
||||
},
|
||||
{
|
||||
"name": "ɵdefineNgModule"
|
||||
}
|
||||
]
|
Reference in New Issue
Block a user