We're building a mid sized Angular application that consists of many modules which are lazy loaded into our app. Our production build size was 7MB total and our build pipeline on Azure DevOps needed approx 6min to build it. Now we had to include Grapecity's ActiveReportJS and our build size went to 19MB, plus our build time increased to 18min.
While the size difference looks as shocking as the increased built time, it actually is not: Because we use lazy loading, we just have a new 11MB big lazy loaded module. But the built time is really bugging us.
Now I'm asking myself if we can extract our ActiveReportJS wrapper module, pre-build it and use this prebuilt JS-file to directly import/use it in our lazy-loading setup (without building and optimizing it every time)?
Alternatively: Is it possible to exclude specific module from the angular optimization
- and/or buildOptimizer
- flag?
Is it possible and has it been done before?