@@ -59,9 +59,9 @@ export function importFactory(
5959Found 'loadChildren' with a non-string syntax in ${ sourceFile . fileName } but could not transform it.
6060Make sure it matches the format below:
6161
62- loadChildren: () => import('IMPORT_STRING').then(m => m .EXPORT_NAME)
62+ loadChildren: () => import('IMPORT_STRING').then(M => M .EXPORT_NAME)
6363
64- Please note that only IMPORT_STRING and EXPORT_NAME can be replaced in this format.
64+ Please note that only IMPORT_STRING, M, and EXPORT_NAME can be replaced in this format.
6565
6666Visit https://next.angular.io/guide/ivy for more information on using Ivy.
6767` ;
@@ -97,14 +97,13 @@ function replaceImport(
9797 emitWarning : ( ) => void ,
9898) : ts . Node {
9999 // This ONLY matches the original source code format below:
100- // loadChildren: () => import('IMPORT_STRING').then(m => m .EXPORT_NAME)
100+ // loadChildren: () => import('IMPORT_STRING').then(M => M .EXPORT_NAME)
101101 // And expects that source code to be transformed by NGC (see comment for importFactory).
102102 // It will not match nor alter variations, for instance:
103103 // - not using arrow functions
104- // - not using `m` as the module argument
105104 // - using `await` instead of `then`
106105 // - using a default export (https://github.com/angular/angular/issues/11402)
107- // The only parts that can change are the ones in caps: IMPORT_STRING and EXPORT_NAME.
106+ // The only parts that can change are the ones in caps: IMPORT_STRING, M and EXPORT_NAME.
108107
109108 // Exit early if the structure is not what we expect.
110109
0 commit comments