agoose77 / markdown-it-mermaid

A markdown-it plugin for MermaidJS
Other
6 stars 4 forks source link

Doesn't support ESM #9

Open dessalines opened 2 weeks ago

dessalines commented 2 weeks ago

I'm getting this error when I try to use this library:

Error [ERR_REQUIRE_ESM]: require() of ES Module file:///home/xxx/git/lemmy-ui/node_modules/.pnpm/mermaid@9.4.3/node_modules/mermaid/dist/mermaid.core.mjs not supported.

Instead change the require of file:///home/xxx/git/lemmy-ui/node_modules/.pnpm/mermaid@9.4.3/node_modules/mermaid/dist/mermaid.core.mjs to a dynamic import() which is available in all CommonJS modules.

https://github.com/LemmyNet/lemmy-ui/issues/2754

agoose77 commented 2 weeks ago

I should return to this library and ensure that it works properly for ESM :) I'll make a note to do that soon. Please ping me if I don't get to it by next Friday?

dessalines commented 2 weeks ago

Sure, thx!

dessalines commented 6 days ago

@agoose77 here's the ping