Skip to content

chore: use render as a devDependency#555

Closed
gabrielmfern wants to merge 6 commits intocanaryfrom
chore/dont-use-peer-dependencies
Closed

chore: use render as a devDependency#555
gabrielmfern wants to merge 6 commits intocanaryfrom
chore/dont-use-peer-dependencies

Conversation

@gabrielmfern
Copy link
Copy Markdown
Member

@gabrielmfern gabrielmfern commented Aug 1, 2025

Continuing on the work of #527.

After testing out the 5.0.0-canary.0 on an existing project I noticed that the approach of using peer dependencies made it so that if the user already had installed the previous version, consequently having @react-email/render in their lockfile, and then updated, it would keep @react-email/render in the lockfile for pnpm, npm and bun. This would not happen for new installs, though.

If we were to keep it as a peer dependency, we'd need to tell users to either remove things from their lockfile manually, or recreate their lockfile (which they should probably not do).

This pull requests changes it so that we use devDependencies instead, this avoids that problem and will reduce the installed dependencies after upgrading.

I tested this with a package prefixed with my name, you can compare installing gabriel-resend-node@4.7.0, and then installing gabriel-resend-node@5.0.0-canary.0 and notice that the lockfile does not include @react-email/render after the version change. Here's what you will find with pnpm:

4.7.0 5.0.0-canary.0
image image
image image

@gabrielmfern gabrielmfern self-assigned this Aug 1, 2025
@gabrielmfern gabrielmfern requested a review from a team as a code owner August 1, 2025 15:33
@gabrielmfern
Copy link
Copy Markdown
Member Author

gabrielmfern commented Aug 4, 2025

We're instead opting into using the peerDependency and telling users to uninstall and then install the sdk if @react-email/render remains installed in the lockfile. This is a temporary problem, not a permanent one, so it's not worth it to go for devDependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant