DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Bartosz Pietrucha for Angular

Posted on

[Pro Tip] How to analyze your Angular bundle

It's time for another Angular Knowledge Pill! πŸ’Š It takes just 10 seconds to learn something new πŸ”₯ Like taking your morning vitamins πŸ˜ƒ

Imagine you are building an application with three modules:

  • main module,
  • records module (lazy loaded feature module),
  • settings module (lazy loaded feature module).

Now, you would like to know how much do those modules contribute to the whole application size! Using a webpack-bundle-analyzer it is more than easy! Take a look at how to analyze your application bundles below.

Alt Text

This will give you a very detailed overview of your application. You can see how much do the final JavaScript bundles weight and how their sizes refer to each other! The colored diagram below is constructed this way that the bigger the given rectangle the heavier the particular bundle!

Alt Text

Alt Text

If you would like to receive this kind of knowledge pills directly into your mailbox, subscribe at angular-academy.com/blog/. I will be sending them regularly! Remember, it just takes 10 seconds to learn something new! πŸ˜ƒ

Also, I would appreciate if you tweet this knowledge pill!
Help others to discover the knowledge!

Top comments (0)

Let's Get Wacky


Use any Linode offering to create something unique or silly in the DEV x Linode Hackathon 2022 and win the Wacky Wildcard category

β†’ Join the Hackathon <-