emersonbottero / vitepress-plugin-mermaid

Add mermaid support for Vitepress
MIT License
95 stars 22 forks source link

@mermaid-js/mermaid-mindmap as dev dependencies #38

Closed dominikcz closed 1 year ago

dominikcz commented 1 year ago

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".

emersonbottero commented 1 year ago

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

dominikcz commented 1 year ago

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.

emersonbottero commented 1 year ago

removed as dependency