Description
Is your feature request related to a problem?
We need to have d2
installed (when skipGeneration
is false), but of course it isn't when you are building with GitHub Actions, Netlify, or Vercel.
Mermaid doesn't have this issue because it is a JavaScript library, so build plugins can simply declare a dependency and use it.
Describe the solution you'd like
The D2 project is working on a JavaScript wrapper: d2js.
It would be great if this plugin could simply import and use this instead of requiring d2
installed.
It will make builds easier on platforms like GitHub Actions, Netlify, and Vercel.
Describe alternatives you've considered
I thought about adding build steps to preinstall d2
but I can't apt-get install d2
(yet).
However, your advice to skipGeneration
is the most realistic solution right now.
Additional Context
Admittedly, d2js
is young (3 days old), but recording this request because it seems like the smartest long-term direction for a plugin like this.
Related, I was surprised to see astro-diagram has been archived, making this plugin a top choice for embedding diagrams.