Skip to content

Docs site: Pause mermaid.js updates

Sarah German requested to merge docs-mermaid into main

This MR disables mermaid updates on the docs site for now.

why

Mermaid's 10.0 release included a breaking change that drops CJS support (https://github.com/mermaid-js/mermaid/blob/master/CHANGELOG.md#mermaid-is-esm-only).

They will likely re-add it in 10.0.3: https://github.com/orgs/mermaid-js/discussions/4148

While we were able transform Mermaid to CJS with Rollup, it adds a significant amount of time to the frontend build and has caused memory-related crashes occasionally in both CI and local environments.

The ESM version runs fine in production but does not work when using nanoc view locally due to web server configuration in nanoc/upstream packages (no mime type handling for .mjs files).

To avoid these issues, we downgraded to 9.x here: gitlab-org/gitlab-docs!3664 (merged)

So, until 10.0.3 comes out and includes a CJS version we can use everywhere, let's pause on Mermaid updates.

Edited by Sarah German

Merge request reports