I just imported this lib and using it, it works but in the console i get this error. I tried dynamic import but that caused other issues before
import html2pdf from "html2pdf.js";
const downloadPdf = async () => {
let content = document.getElementById("invoice");
html2pdf(content, {
filename: `${invoiceData.invoiceNo}.pdf`,
image: { type: "jpeg", quality: 1 },
html2canvas: { scale: 2 },
}).save();
};
whats the proper way to load this library