@@ -59,9 +59,9 @@ export function importFactory(
59
59
Found 'loadChildren' with a non-string syntax in ${ sourceFile . fileName } but could not transform it.
60
60
Make sure it matches the format below:
61
61
62
- loadChildren: () => import('IMPORT_STRING').then(m => m .EXPORT_NAME)
62
+ loadChildren: () => import('IMPORT_STRING').then(M => M .EXPORT_NAME)
63
63
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.
65
65
66
66
Visit https://next.angular.io/guide/ivy for more information on using Ivy.
67
67
` ;
@@ -97,14 +97,13 @@ function replaceImport(
97
97
emitWarning : ( ) => void ,
98
98
) : ts . Node {
99
99
// 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)
101
101
// And expects that source code to be transformed by NGC (see comment for importFactory).
102
102
// It will not match nor alter variations, for instance:
103
103
// - not using arrow functions
104
- // - not using `m` as the module argument
105
104
// - using `await` instead of `then`
106
105
// - 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.
108
107
109
108
// Exit early if the structure is not what we expect.
110
109
0 commit comments