Angular Microfrontend build file size increases after deployment vs local build — why?

Discussão em 'Angular' iniciado por Manishyadav, Setembro 10, 2025.

  1. Manishyadav

    Manishyadav Guest

    I have an Angular 20 application using a Microfrontend architecture. I noticed that the build output file sizes shown locally differ from the sizes I see after deployment.. If any other information is required , plz do let me know ...

    Local build (ng build --configuration production):


    styles.css 35 KB

    polyfills.js 19 KB

    main.js 7 KB

    scripts.js 20 KB
    ​

    After deployment (observed in browser DevTools / network tab):


    styles.css 50.1 KB

    polyfills.js 20.7 KB

    main.js 8 KB

    scripts.js 23.5 KB
    ​

    What i tried ,

    1. Removed the unwanted css, imports.
    2. Made each component to lazy load.

    Expectation: I expected the deployed files to match the optimized build sizes, but they are consistently larger by a few KB.

    Continue reading...

Compartilhe esta Página