Skip to Main Content
Cumulocity IoT Feedback Portal
Status Planning / planned
Created by Guest
Created on Aug 26, 2022

Improve production ready build for performances

Hello,

We spent some days in optimizing the performances (load time in browser + time to interactive) of our packaged app and found some improvements that could be appreciated (related to Empower support ticket SI-479203) :

  • Completely support AOT compilation (in order to remove JIT compiler from bundle and browser load)

  • Add by default a webpack IgnorePlugin for example to reduce libraries size (like "moment") :

    • new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/, contextRegExp: /moment$/, })

  • Documentation! Documentation! Documentation! : web sdk online doc should be more complete and precise to avoid hours and hours of digging in C8Y libraries code.

    • For example, regarding parameters that we can use in build command line : there are only few mentions of "--env.mode" but never about "--env.tsConfigPath" or "--env.extraWebpackConfig"

    • Describe the default webpack config + angular compiler options setup by C8Y framework, in order to know what we can add or not to avoid pitfalls and conflicts (due to webpack config merge)

  • Attach files
  • Admin
    Rahul Talreja
    Reply
    |
    Jul 12, 2023

    Hi Paul-Emmanuel,

    Thanks for your feedback. We investigated and AOT is sadly not an option as we are loading micro frontends via JIT. However, we started to implement as much as possible into lazy loading to reduce the bundle size and as well also removed any 2d mash from the bundle and will look furthermore into moment locales.

    Additionally, we are currently working on a better documentation with more examples and details about the tooling. We will keep you updated on its release progress and once released will reach out to gather your feedback.

    Regards
    Rahul