-
Notifications
You must be signed in to change notification settings - Fork 12k
feature module lazy loading not working #10740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Same here. var map = { "./XXX/XXX.module": [ "./src/app/components/XXX.module.ts" ], }; function webpackAsyncContext(req) { var ids = map[req]; if(!ids) { return Promise.resolve().then(function() { var e = new Error('Cannot find module "' + req + '".'); e.code = 'MODULE_NOT_FOUND'; throw e; }); } return Promise.all(ids.slice(1).map(__webpack_require__.e)).then(function() { ******* <-- HERE ******* var module = __webpack_require__(ids[0]); return module; }); } webpackAsyncContext.keys = function webpackAsyncContextKeys() { return Object.keys(map); }; webpackAsyncContext.id = "./src/$$_lazy_route_resource lazy recursive"; module.exports = webpackAsyncContext; |
This appears to be a bug but we will need to look at a reproduction to find and fix the problem. Can you setup a minimal reproduction please? You can read here why this is needed. A good way to make a minimal reproduction is to create a new app via |
Duplicate of #9651 |
Duplicate of #9488 |
Duplicate of #9775 |
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information. If the problem persists, please file a new issue and ensure you provide all of the required information when filling out the issue template. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Versions
My code base
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes } from "@angular/router";
import { HomeComponent } from "./home/home.component";
import { AdminModule } from "./admin/admin.module";
const routes: Routes = [
{
path: 'admin',
loadChildren: './admin/admin.module#AdminModule'
},
{ path: '', redirectTo: '/home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent },
];
@NgModule({
imports: [
CommonModule,
RouterModule.forRoot(routes)
],
exports: [
RouterModule
],
declarations: []
})
export class AppRoutingModule { }
###Error thrown
The text was updated successfully, but these errors were encountered: