How to decrease prod bundle size?

后端 未结 14 1416
Happy的楠姐
Happy的楠姐 2020-11-28 01:31

I have a simple app, initialized by angular-cli.

It display some pages relative to 3 routes. I have 3 components. On one of this page I use lodash

14条回答
  •  野性不改
    2020-11-28 01:50

    I have a angular 5 + spring boot app(application.properties 1.3+) with help of compression(link attached below) was able to reduce the size of main.bundle.ts size from 2.7 MB to 530 KB.

    Also by default --aot and --build-optimizer are enabled with --prod mode you need not specify those separately.

    https://stackoverflow.com/a/28216983/9491345

提交回复
热议问题