Webpack and dist setup
We need a setup that creates the CSS, base JS and all single JS files for the Shared Components. So we can support Lazy loading as they will also need more external libraries (for example PDF Content Viewer).
Distribution Setup
Main JS export (base components and utils)
One file (gitlab-ui
) which contains all basic components which are used frequently and everywhere and util functions. This means vue-bootstrap based components but also components like Icon
, everything that is in /src/components/basic
. Also, it will include everything in /src/utils
and /src/directives
.
CSS
One file which contains Bootstrap 4 and the CSS which is just needed for the components (both basic as also complex)
Single Complex components bundle exports
We export all components in /src/components/complex
as single bundles so they can be loaded optional and are not bloating the main bundle as they most probably need also external dependencies (for example ContentViewer -> PDF Viewer)