import html2png, { renderHtml as htmlParser } from '@besties/html2png' import fs from 'node:fs' const css = fs.readFileSync('./assets/style.css', 'utf8') export default async function (html, options = {}) { return html2png(html, css, options) } export async function renderHtml(html) { return htmlParser( html, await fs.promises.readFile('./assets/style.css', 'utf8') ).outerHTML }