How to reduce main.js bundle produced by Angular 15 with Angular Materials

454 Views Asked by At

I am building Angular app v15.x with using of Angular Material (alse v15.x) libs and my main struggle is, that my initial chunk is bigger then 500kb. This is size of production build with all optimizations and latest angular+material libs. I am using lazy loading for all components except login page.

Angular production build results

I know:

  • I can increase warning/error limits for initial chunk
  • I can gzip files

But basically I am a bit surprised, that angular with materials grows this much.

Here I am adding also webpack bundle analyzer screen -> webpack bundle analyzer result

Is this size ok or am I missing something? Thanks

0

There are 0 best solutions below