emersonbottero/vitepress-plugin-mermaid

@mermaid-js/mermaid-mindmap as dev dependencies

dominikcz opened this issue · 3 comments

Since merging #32 there is a side effect, that you have to add @mermaid-js/mermaid-mindmap as devDependency to main project. I suppose it would be better DX if vitepress-plugin-mermaid handled it internally

[vite]: Rollup failed to resolve import "@mermaid-js/mermaid-mindmap" from "(...)vitepress-plugin-mermaid/dist/mermaid.ts".

Probably I can try to import dynamic and if it fails I just ignore it and just log package not found...

Seems like a good idea for me. Now it is just strange that even if I don't plan to use mindmaps anywhere I have to use:
npm i -D @mermaid-js/mermaid-mindmap in my vitepress projects.

removed as dependency