Lazy loading in production

ForumCategory: QuestionsLazy loading in production
ilia asked 7 months ago

hi:)
I try to load my Modules in lazy loading way.
so i i did the next in my routes.ts file:

export const LoginRoutes: Route[] = [
{
path: 'login',
loadChildren: "app/login/login.module#LoginModule"
}
...
];

 
when i run “gulp build.dev” to build the project it works great!!! the problem is when i run “gulp build.prod“!! in the end of the build process i get only one app.js main file and when i try to load my project to browser and reach login page it throw an error (it doesn’t recognize it)
how can i make this lazy loading thing to work in production???
 

1 Answers
admin Staff answered 7 months ago

Hi Ilia 🙂
 
Lazy loading is not configured yet in the theme. 
You can try Angular CLI for it.
 
Thanks.

ilia replied 7 months ago

hi again:)
will lazy loading feature be added in the future?

ilia replied 7 months ago

tnx