How to decrease bundle-size?

Posted by: eyhenij on 21 September 2021, 4:14 am EST

  • Posted 21 September 2021, 4:14 am EST

    My angular application uses ActiveReportsJS package. App only uses ar-js-viewer functionality (for viewing and for printing payment stuff). But now my bundle is over 15.7 Mb (it is less 1.5 Mb without package). How can I avoid this?

  • Posted 21 September 2021, 7:23 pm EST

    I am not sure where 15.7MB came from. If you are using the only viewer, core, and export functionality, its cumulative size is ~7MB.

  • Posted 20 April 2023, 3:45 am EST - Updated 20 April 2023, 3:50 am EST

    It is an old thread, but I have the same issue. I am only using the viewer, but as soon as I add the ActiveReports JS module:

    import { ActiveReportsModule } from ‘@grapecity/activereports-angular’;

    And import the viewer:

    import { ViewerComponent } from ‘@grapecity/activereports-angular’;

    all modules are added to the bundle, including the designer, which I am not using. I am wondering if tree-shaking is not working or there is a different way to import the Viewer to prevent this. This is with:

    @grapecity/activereports-angular”: “^3.2.0”

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels