Closed Jarrodsz closed 1 year ago
The problem is I need a replacement for this line:
import { render } from "mjml-react";
to be able to remove it from my npm package 😞
Hi @Jarrodsz, I believe the replacement you are looking for is:
import { render } from "@faire/mjml-react/utils/render"
See here: https://github.com/Faire/mjml-react/blob/main/src/utils/render.ts#L14
We moved it out of the main package export, as it requires html-minifier
as a dependency but we recognize not all users want to have this minification. We now recommend writing your own render function in the readme as it seems users are split between mjml and mjml-browser as well. But we kept the existing render function for ease of migrating to v3, just moved it.
Great thank you for the writeup! Could not find the right method in the package itself this works
I tried debugging this for 30 minutes to no avail. I have existing render method for rendering mjml mails converted from mjml-react which I still depend on but want to remove this dependency.
The problem here is there seems to be no
render
method or replacement on@faire/mjml-react
Is there a workaround for this or is there a hidden method on @faire/mjml-react that i missed to render my content like this?