-
Notifications
You must be signed in to change notification settings - Fork 752
feat(react-email): Unify all components into react-email
#1800
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
base: 4.0
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 5a7e753 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
02eb228
to
ff43b73
Compare
4ee4d1d
to
0187b0a
Compare
46eb766
to
946127b
Compare
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
cf7c842
to
5b88a66
Compare
7c321c8
to
fa542bf
Compare
1ec9fdc
to
b2142fc
Compare
I hope this does not mean that there will be no way to import components separately? The |
@oxc They won't be available separately anymore, but we don't plan to keep the preview server as part of |
This PR moves all components into
packages/react-email/src/package
on each individual folder and builds them all together so that users can import fromreact-email
instead of from@react-email/components
.To actually get this to work in a simple way, I changed Tailwind to be built with tsup instead of with vite, this makes things a bit simpler and also makes it safer for edge cases. The only way I got this to work properly was through patching the dependencies that had some problem, this also came with the trade-off caused by the fact that pnpm doesn't let you patch a version of the package while using another unpatched version of it. To properly deal with this, the only way I found was to keep a patched version of the packages in the workspace and use them on the Tailwind component, this is the reason for the 400 Files changed.
I also added in a simple optimization to the
getEmailComponent
function so that it uses the rebuild API for faster builds.Another change I made was to upgrade the tests under
tailwind/integrations/*
so that they are a bit simpler and safer.This PR also does small changes to turbo and the Github Action to avoid duplicated work being done.
The reason for the amount of additions being so large in comparison to the deletions is both because of the new
patched/*
directory and also because I have not removed all the component packages frompackages/*
as it's probably better to remove it on another subsequent PR.