feat(compiler-cli): lower loadChildren fields to allow dynamic module paths (#23088)
Computing the value of loadChildren does not work externally, as the CLI needs to be able to detect the paths referenced to properly set up codesplitting. However, internally, different approaches to codesplitting require hashed module IDs, and the computation of those hashes involves something like: {path: '...', loadChildren: hashFn('module')} ngc should lower loadChildren into an exported constant in that case. This will never break externally, because loadChildren is always a string externally, and a string won't get lowered. PR Close #23088
This commit is contained in:
@ -28,7 +28,7 @@ const IGNORE = {
|
||||
|
||||
const USE_VALUE = 'useValue';
|
||||
const PROVIDE = 'provide';
|
||||
const REFERENCE_SET = new Set([USE_VALUE, 'useFactory', 'data', 'id']);
|
||||
const REFERENCE_SET = new Set([USE_VALUE, 'useFactory', 'data', 'id', 'loadChildren']);
|
||||
const TYPEGUARD_POSTFIX = 'TypeGuard';
|
||||
const USE_IF = 'UseIf';
|
||||
|
||||
|
Reference in New Issue
Block a user