When should I concat Angular2 App as opposite to SystemJS approach?

后端 未结 1 937
刺人心
刺人心 2021-01-28 15:39

When should I concat my Angular2 app, and when should I leave my SystemJS original approach (leaving different modules in different files)?

1条回答
  •  情话喂你
    2021-01-28 16:10

    It mainly depends on browser support.

    The old way, pre http2, was to bundle everything into one big file. Now that we have http2 on the way, it's no longer necessary depending on what browsers and servers you target.

    Please note that the server should be configured for http2 if you are serving many files, but both nginx and apache (with mod_http2) has http2 support, so you should be ok.

    Browser support: ~70% according to Can I use.

    0 讨论(0)
提交回复
热议问题