-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Closed
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationsopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).An issue that is suitable for a community contributor (based on its complexity/scope).
Milestone
Description
Command
generate
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
this is a new migration schematic
Description
using the new migration schematic
ng generate @angular/core:route-lazy-loading
results in 'Could not find any files to migrate under the path ...'
The Routes are exported as default, which causes the schematic to fail finding them.
Minimal Reproduction
trying to migrate the following route.ts file:
export default [
{
path: '',
component: SomeComponent,
children: [
{ path: 'index', component: IndexComponent },
{ path: 'index/:name', component: IndexDetailComponent, resolve: { index: indexDetailResolver } }
]
}
] as Routes;
using:
ng generate @angular/core:route-lazy-loading --path src/app/something
fails, because the migration schematic does not recognize the Routes, which are exported as default.
Exception or Error
Your Environment
"@angular/cli": "^19.0.1"
Anything else relevant?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: migrationsIssues related to `ng update`/`ng generate` migrationsIssues related to `ng update`/`ng generate` migrationsopen for contributionsAn issue that is suitable for a community contributor (based on its complexity/scope).An issue that is suitable for a community contributor (based on its complexity/scope).