mermaid fails to load in IE11
See original GitHub issueDescribe the bug Users expect IE11 support. This was raised in #1030 and addressed in #1103. However, this fix did not worked. This impacts users of products that depend on mermaid too (e.g. GitLab).
When loading mermaid with IE11 it failes because of a sytax error în crypto-random-string
.
const generateForCustomCharacters = (length, characters) => {
^^^^^^^^^^^^^^^^
Lamdba functions have been introduced in ES6 and therefore IE11 does not support them. When looking at the compiled build it seems like the node modules are not transpiled accordingly. All node modules need to be included in babel aswell in order to make mermaid usable in IE11.
To Reproduce
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
</head>
<body>
<div class="mermaid">
graph LR; A --- B; B-->C[fa:fa-ban forbidden]; B-->D(fa:fa-spinner);
</div>
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.js"></script>
<script>
mermaid.initialize({ startOnLoad: true });
</script>
</body>
</html>
Related to #1082
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Mermaid can't render stateDiagram-v2 (#290000) - GitLab
On debugging this on mermaid live editor and on our GFM, I was able to come up with a fix. It's by turning...
Read more >mermaid | Yarn - Package Manager
Cannot Render the Mermaid Graph to PDF ? #520; clicking links works from inset in subgraph but not from nodes #516; Strange syntax...
Read more >mermaid/CHANGELOG.md - UNPKG
204, - npm test fails on osx being blocked at Can not load "PhantomJS", it is not registered! [\#337](https://github.com/knsv/mermaid/issues/337).
Read more >Changelog - Mermaid zh-cn doc - Hello Wac
Question: lib/phantomscript.js - foreignObjects in SVG - related to #58 #340; npm test fails on osx being blocked at Can not load "PhantomJS", ......
Read more >oyr - River Thames Conditions - Environment Agency - GOV.UK
Bt player not working, Ch25s-68561, Mitchell on demand 5.8 key diskette, ... Sharepoint 2010 datasheet view ie11, Deshler police department ohio, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To fully support IE11, we should include Mermaid dependencies also
I’ve changed the file
webpack.config.base.js
and added libraries used in package.json that is not clearly compatible with IE11With this change, the mermaid.min.js loads without errors, flowcharts and sequence diagrams work, BUT, other types of diagrams (e.g., Gantt, Class, …) doesn’t work and cause JS errors in the console.
Adding polyfill to babel compilations breaks the code
As IE11 is heading towards EOL later this year I am closing this issue as “wont fix”.