I wanted to use the convenience of SVG.js, which you can find at .

I was able to import and draw a simple example using SVG.js. I did the importing with:

SVGmodule = import("@svgdotjs/svg.js")
SVG = SVGmodule.SVG

As I was building this example, it seemed that the animation was not working until I refreshed the page after saving. I also had a hard time setting up the container for drawing into, which seemed like a timing problem. But I managed to workaround this by doing the following:

  const drawing = SVG();
  document.getElementById("container").innerHTML = "";