Surprisingly complicated. Figma supports SVG → PDF but not the other way around. Sketch supports PDF → SVG with some bugs (often vector shape overlaps are incorrect.)
dawbarton/pdf2svg
looks like an interesting project
that could be compiled as WASM but it is itself poinsoned by GNU GPL license.
Plus, it depends on a huge amount of (also GPL-licensed) code in the form of Poppler and Cairo.