Proposal: Stop rolling-up bootstrap-vue
At the moment we are including the whole of bootstrap-vue in our bundle, this makes our bundle very big. Maybe we should consider excluding it with the external
option for roll-up, like we do for other dependencies: https://gitlab.com/gitlab-org/gitlab-ui/blob/9904e2e8fe704c959ee1fc69b2d27d042b4a4523/rollup.config.js#L18-28
Concerns we need to address:
- At the moment rollup helps us transpiling bootstrap-vue from ES6 src to common-js, we probably would need to switch to the common-js build. What quality does it have? Should we maybe enable webpack in CE to consume the source instead?
- Due to us bundling the bootstrap-vue code, we actually lock the version of bootstrap vue. We should consider switching from
^
to a fixed version in the package json in order to avoid problems
Original issue body
Philosophical question ahead: Our rolled up gitlab-ui is big:
Source: http://gitlab-org.gitlab.io/gitlab-ce/webpack-report/
Would it make sense to not convert ES6 -> ES5 in this repository and instead compile it in CE?
This is a thing we have done at a previous gig:
In GitLab CE: Compile nothing from node_modules/
except node_modules/@gitlab
, so we have three-shaking and proper bundling available.
/cc @mikegreiling