Skip to content

feat(preview-server): Improved development workflow #2249

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

Draft
wants to merge 12 commits into
base: feat/separate-preview-server-from-cli
Choose a base branch
from

Conversation

gabrielmfern
Copy link
Collaborator

@gabrielmfern gabrielmfern commented May 16, 2025

This implements two scripts for doing dev work on the preview server that is completely separate from the CLI. The first script creates an emails directory that is not committed with a simple repeated file structure. The idea is to be able to only work in the preview server with the most simple way.

The seed command doesn't currently generate anything at random right now because I don't know exactly how we would generate emails in a meaningful way here.

The other script actually runs next dev and creates an .env.local with values imitating what the CLI would give the preview server for things to work properly. This needs to be a script because we need to delte the file after next dev closes. If we don't, the file can interfere with subsequent builds of the preview server.

Copy link

vercel bot commented May 16, 2025

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

Name Status Preview Comments Updated (UTC)
react-email ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 16, 2025 3:42pm
react-email-demo ❌ Failed (Inspect) May 16, 2025 3:42pm

Copy link

changeset-bot bot commented May 16, 2025

⚠️ No Changeset found

Latest commit: 7e49df3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@gabrielmfern gabrielmfern force-pushed the feat/preview-server-development branch from f6907b1 to d0c21e5 Compare May 16, 2025 15:14
@gabrielmfern gabrielmfern self-assigned this May 16, 2025
@gabrielmfern gabrielmfern marked this pull request as draft May 16, 2025 15:14
Copy link

pkg-pr-new bot commented May 16, 2025

Open in StackBlitz

npm i https://pkg.pr.new/resend/react-email/@react-email/preview-server@2249
npm i https://pkg.pr.new/resend/react-email@2249

commit: 7e49df3

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.

2 participants