feat: Make gitlab-ui tree-shakeable
The two integration MRs can be found here:
Please test them as well.
We actually save ~100KB by these measures in the "main" bundle"
Before | After |
---|---|
feat: Make gitlab-ui tree-shakeable
Currently we are fully rolling up bootstrap-vue and gitlab-ui into the entry points:
-
@gitlab/ui
(alias for@gitlab/ui/dist/index.js
) @gitlab/ui/dist/charts.js
@gitlab/ui/dist/utils.js
This results in a pretty big bundle, index.js is currently 752 KB in size, because it contains all components except for our charts.
By disabling the bundling in our builds, we can make usage of webpack's treeshaking capabilities and just import bundles where they are needed.
As a nice side effect, this reduces compilation time substantially.
Edited by Lukas 'ai-pi' Eipert