sofn-xyz / mailing

Build, test, send emails with React
https://www.mailing.run
MIT License
3.6k stars 74 forks source link

Pass minifier callback to mjml-react render method #466

Closed Jaraujo6 closed 1 year ago

Jaraujo6 commented 1 year ago

Describe your changes

Currently, the sendMail api turns off minification by default and does not provide a mechanism by which users can supply their own minification. This pull request seeks to change that by adding an optional callback to the buildSendMail option arg, that if present, will be called using html created from the react-mjml render method, and returned from the mailing render method.

This approach decouples the minifier dependency from the larger mailing repository which means that users can use any library or implementation they please, as long as the callback accepts a string as an argument and returns a string, reducing the maintenance burden on the mailing support team.

Issue link

N/A

Checklist before requesting a review

changeset-bot[bot] commented 1 year ago

🦋 Changeset detected

Latest commit: 5fa541f656e9d0df1f4f3e8f9208ba4e9f333760

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages | Name | Type | | ------------ | ----- | | mailing-core | Patch | | web | Patch | | mailing | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 year ago

@Jaraujo6 is attempting to deploy a commit to the sofn Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mailing-dynamic-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 20, 2023 10:16pm
web-emails ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 20, 2023 10:16pm
1 Ignored Deployment | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **mailing-web** | ⬜️ Ignored ([Inspect](https://vercel.com/sofn/mailing-web/Cs1KAg6G9bs8diAFGtogdaHXJyDX)) | [Visit Preview](https://mailing-web-git-fork-jaraujo6-ja-add-minifier-callback-sofn.vercel.app) | | Apr 20, 2023 10:16pm |