Create slim render package without prettier #1905
thena-seer
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Does tree shaking not remove prettier if you are not using it here? Or does the conditional make it keep it either way? We would probably rather have it as a separate export, if anything. We could also just export the |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
Build size is very important for some javascript development use cases. @react-email/components is somewhat heavy for what it does, largely due to its dependency on prettier. In a repository that is already using react, @react-email/components adds about 12 Mb of install size, with
prettier
taking up 7.6 Mb. Right now, users are forced to clone-and-own if they want to remove the impact of this optional functionality.Proposal
The
prettier
functionality is only relevant inside of a small conditional:It would be extremely simple to provide a version of @react-email/render that does not contain this dependency. It could be a separate package, or a separate export inside of the same package.
I would be happy to help contribute.
Beta Was this translation helpful? Give feedback.
All reactions