Elk renderer not loading properly when using ESM #4593
-
|
I have a problem when using the elk renderer. It works fine when I include mermaid like this: <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script>But it stops working if I switch to ESM: <script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/[email protected]/+esm'
</script>Somewhere along the line it tries to import Now, my question is, is this a problem on my side? Or with Mermaid, or the content deliverer? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
That is a CDN specific issue. <script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
</script>https://mermaid.js.org/config/usage.html#simple-full-example |
Beta Was this translation helpful? Give feedback.
That is a CDN specific issue.
Please use the official supported URL instead.
https://mermaid.js.org/config/usage.html#simple-full-example