How to decrease prod bundle size?

后端 未结 14 1430
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:38

    Another way to reduce bundle, is to serve GZIP instead of JS. We went from 2.6mb to 543ko.

    https://httpd.apache.org/docs/2.4/mod/mod_deflate.html

提交回复
热议问题