shellscape / jsx-email

Build emails with a delightful DX
https://jsx.email
MIT License
902 stars 28 forks source link

feat(jsx-email): show html size, warn if over gmail threshold #89

Closed shellscape closed 7 months ago

shellscape commented 7 months ago

Component / Package Name: jsx-email

This PR contains:

Are tests included?

Breaking Changes?

If yes, please include "BREAKING CHANGES:" in the first commit message body, followed by a description of what is breaking.

List any relevant issue numbers:

Description

This PR introduces the display of the generated HTML size on disk. Gmail in particular has a message clipping threshold of 102kb. With these changes it's easy to see at a glance if an email template is exceeding that threshold when running email build. The email check command will now display errors (over the threshold) or warnings (near the threshold) for email template output.

Screenshot 2023-12-02 at 10 22 00 AM Screenshot 2023-12-02 at 10 23 00 AM Screenshot 2023-12-02 at 10 23 09 AM