Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
Optimize imports weight


I'm currently working on a project which require only the IgxGridModule from the awesome Ignite UI for Angular library.

However, the single import of the component makes me load the 4.34 MB of the Igniteui-angular.js file on app or page load wich is quite heavy especially for the mobile users.

So my question is quite simple : "do I/we have a way to lighten this import ?"

I understand that some core parts need to be kept with IgxGridModule but gaining access to the size modularity would be an opportunity to improve performance for most of the ignite ui users

  • 5105
    Verified Answer
    Offline posted

    Hi there, Adrien,

    The size of the file that you're seeing is the development mode build, which is debug version, with source maps and other development goodies included. It's not tree-shaked, neither AOT-compiled. When you run the production build, you will see that everything that you're not using from the IgxGridModule gets tree shaken, which makes the vendor file much-much smaller.

    Here's an app I just quick-started with the igniteui-cli, and added a grid to it. I run the production build and the result is:

    So, the development version size should not bother you. In fact in a regular Angular application in development, it grows to 12-15MBs.

    I hope that helps!

    Thank you for using Ignite UI for Angular,

    Konstantin Dinev

Reply Children
No Data