-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @ngtools/webpackfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Milestone
Description
🐞 Bug report
Command (mark with an x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Description
When I use typing and add module as argument
app-routing.module.ts
loadChildren: (): Promise<any> =>
import('./view/auth/auth.module').then((module: any) => module.AuthModule)Build failed
WARNING in
Found 'loadChildren' with a non-string syntax in src/app/app-routing.module.ts but could not transform it.
Make sure it matches the format below:
loadChildren: () => import('IMPORT_STRING').then(M => M.EXPORT_NAME)
Please note that only IMPORT_STRING, M, and EXPORT_NAME can be replaced in this format.
Visit https://v8.angular.io/guide/ivy for more information on using Ivy.
but if we change
loadChildren: () => import('./view/auth/auth.module').then((m) => m.AuthModule)it's work, but why? This behavior is not obvious enough, I want to specify types forcibly everywhere, but as a result, the parsing does not work correctly! Problem reproduced with only AOT.
🌍 Your Environment
Angular 8.0.1
BorntraegerMarc, acrontum-sanchez, geofm250, PranoySarkar, shaycraft and 1 more
Metadata
Metadata
Assignees
Labels
area: @ngtools/webpackfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix