Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use some frontend mjml validation #327

Open
jdrouet opened this issue Aug 19, 2024 · 2 comments
Open

Use some frontend mjml validation #327

jdrouet opened this issue Aug 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jdrouet
Copy link

jdrouet commented Aug 19, 2024

👋 I've seen you're using mrml in the backend and some js in the frontend.
Did you know you could validate the template directly in the frontend with https://www.npmjs.com/package/mrml and avoid some computation/network costs?

@wmnnd
Copy link
Contributor

wmnnd commented Aug 19, 2024

Oh, that’s cool, I didn’t know there was a WASM version of it!

I’m actually planning to add some frontend validation eventually. But I would probably give the official MJML package a try first because it seems to give more meaningful error messages when the markup is invalid 😊

I also think I could optimize things further by rendering the MJML only once instead of for every recipient when sending a campaign.

But for now (aside from error handling), using mrml on the backend works like a charm and I’m excited to see how it performs at scale! So thanks again for creating it!

@wmnnd wmnnd added the enhancement New feature or request label Aug 19, 2024
@jdrouet
Copy link
Author

jdrouet commented Aug 19, 2024

Last time I tried, it was not possible to run mjml in the frontend. That was the original reason for building mrml 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants