ELK +esm issue #4449
|
I tried to use elk editor in my project. Unfortunately I keep getting 500 error in the console for this url: https://cdn.jsdelivr.net/npm/elkjs@0.8.2/lib/elk.bundled.js/+esm I see that Live Editor works fine. Any Idea what needs to be done here? |
Replies: 3 comments 1 reply
|
How are you using the script? From the docs... <body>
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });
</script>
</body> |
|
In .js file: |
|
OK, I replaced "import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10.2.2/+esm'" Any idea why everything else works with first import except elk diagrams? I still do not think Error 500 should be thrown in that case. Are there any obvious differences between these two approaches? |
How are you using the script?
From the docs...