Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

219
Views
Angular Doing lazyload but still have 1 main.js
  1. app-routing https://prnt.sc/20zqxzy

const routes: Routes = [
  {
    path: '',
    loadChildren: () => import(/* webpackChunkName: "index" */ './pages/module/main/index-page/index-page.module').then(m => m.IndexPageModule)
  }, {
    path: 'user',
    loadChildren: () => import(/* webpackChunkName: "user" */ './pages/module/user/user-routing/user-routing.module').then(m => m.UserRoutingModule)
  }
 ]
 
 
@NgModule({
  imports: [RouterModule.forRoot(routes, {
    initialNavigation: 'enabledBlocking'
  })],
  exports: [RouterModule]
})
export class AppRoutingModule { }

  1. index-page-routing https://prnt.sc/20zr52z

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { IndexPageComponent } from './index-page.component';

// Pages

const routes: Routes = [
  {
    path: '',
    component: IndexPageComponent,
  },
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class IndexPageRoutingModule { }

But here when i build a project https://prnt.sc/20zr994

It's have only main.js files and no have any lazy chunk files. what i doing wrong ?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Check these modules for static import into any non lazy loaded module.(In most cases AppModule)

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!