Mermaid webpack chunk is humongous

The mermaid feature added in gitlab-org/gitlab-ce!15107 creates a webpack bundle that includes:

  • the entire lodash library
  • moment.js and all locales (a redundant, different version from the one we use elsewhere on gitlab)
  • TWO copies of D3 at different versions

Screen_Shot_2017-11-27_at_5.31.16_PM

We are also in the process of upgrading to d3 v4 (!15585 (merged)), and this may force us to retain a copy of d3 version 3 in perpetuity until mermaid is updated 😦

/cc @blackst0ne @jivanvl