Document code-splitting policies and put together a training workshop for frontend engineers

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

We barely utilize code-splitting at GitLab despite the many opportunities we have to do so. Code splitting enables us to lazy-load non-essential code after the initial page render in a way that improves user-perceptible performance metrics. For instance, content and business logic for a modal window, or a dropdown, or a content tab, which is not initially visible need not block the initial page render. It can instead be deferred to an on-demand "chunk" that webpack handles for us through a Promise interface.

Deliverables:

  • Implement preload and prefetch directives within our webpack-rails integration.
  • Identify places in our source code that would benefit from code-splitting and turn them into tutorialized examples.
  • Document code-splitting best practices for GitLab and canonize them within our frontend developer documentation.
  • Put together a training workshop for frontend engineers and upload to youtube.
Edited by 🤖 GitLab Bot 🤖