function loadCanvg() {
    return function () {
      if (globalObject["canvg"]) {
        return Promise.resolve(globalObject["canvg"]);
      }

      return import('canvg');
    }().catch(function (e) {
      return Promise.reject(new Error("Could not load canvg: " + e));
    }).then(function (canvg) {
      return canvg.default ? canvg.default : canvg;
    });
  }
jsPDF SVG plugin

@name svg
@module