saguijs / sagui

:monkey: Front-end tooling in a single dependency

Home Page:http://sagui.js.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for creating custom chunks/a vendor chunk

Deschtex opened this issue · comments

At the moment the only chunk, other than the ones produced for the pages, is the common chunk. If you have many dependencies shared between pages, then it's easy for the common chunk to get very large.

A way of mitigating this is to allow the creation of custom chunks. For instance, if all the vendor dependencies are extracted to its own bundle, then the common chunk should decrease in size and you will hopefully also be able to load your application faster since the files will be downloaded in parallel.

So, one option is to add support for creating any chunk you would like, and another option is to add support for specifying what vendors you have and having Sagui create a vendor chunk for you and include it in the entries alongside the common chunk.

See https://github.com/webpack/webpack/tree/master/examples/common-chunk-and-vendor-chunk for details.

WDYT?