POC: Add rollup in order to be able to write modern Vue and JavaScript.

The Why

Different parts of the www-gitlab-com repository have been built with Vue now:

  • The SDLC comparison tabs
  • The Compensation calculator

All this features have been built with Directly in hand-crafted JavaScript files which are then sent to the browser. This comes with considerable downsides:

  1. It makes testing a bit harder
  2. It doesn't allow to write Single File Components which are a big feature of Vue
  3. It is easy to introduce browser specific bugs, because the developer might forget to test in browsers
  4. Development comfort is a bit better if Frontend engineers want to help out

The What

  1. This adds a new folder to the repository, called frontend/. This is where new and modern JavaScript parts can find their new home.

  2. The folder has a new sub-folder called frontend/bundles/. These files will be rolled-up and built. The built files will be added to javascripts/bundles/ via an external pipeline.

  3. Say you have a bundle called frontend/bundles/example.js, you can use it by adding:

      extra_js:
        - bundles/tech-stack.js

    to the frontmatter of the file you want to add it to.


Closes #2157 (closed)

Edited by Lukas Eipert

Merge request reports

Loading