fs without relying on jsdom
I am developing a LaTeX plugin for a cross-platform H5 engine. I need the SVG functionality of MathJax-Node, but it relies on the fs module of jsdom. I don't know how to remove the fs module. Since the H5 engine is cross-platform, it does not support DOM or the fs module of Node.js. However, it can run standard JavaScript code. I use the Parcel bundling plugin to create a single JS file. I don't know how to use MathJax-Node to export SVG without relying on the fs module.
You will likely not be able to do what you want with mathjax-node, which is an ancient hack to allow node to work with MathJax v2. The current MathJax release is 3.2.2 and we are preparing v4.0.0 to be released this month.
MathJax v3 was a complete rewrite of MathJax and support for its use in node applications was one of its goals. I'd recommend moving to MathJax v3 directly rather than using this older stop-gap interface. There are lots of examples in the MathJax node demos repository. You will want to use the ones in the direct subdirectory if you want to make a single-file package. Note, however, that MathJax is a pretty heavy dependency, especially with SVG output, as all the font data and paths will be included, and that is a lot of data.