-
Notifications
You must be signed in to change notification settings - Fork 862
fix(react-email): Make the userProjectLocation generic. #2657
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: canary
Are you sure you want to change the base?
Conversation
…hanging the root dir.
|
|
@julioflima is attempting to deploy a commit to the resend Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the dynamic next.config.js generation in the build command to use proper Node.js path methods instead of string interpolation for path construction.
- Replaced hardcoded
process.cwd()string interpolation withpath.resolve(__dirname, "../")for determining the user project location - Replaced hardcoded
builtPreviewAppPathstring interpolation withpath.join(userProjectLocation, reactEmailDir)for the preview server location - Introduced a
reactEmailDirconstant to avoid hardcoding the.react-emaildirectory name
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
|
I'm not sure I follow, what's the reasoning for this? Doesn't it break existing flows? |
To able to build locally and use NextJS just changing the root dir.
Summary by cubic
Made path handling in the React Email build generic so local Next.js builds work even if the project root changes. Preview server path now points to .react-email in the project root instead of a hard-coded build output.
Written for commit 1287ded. Summary will update automatically on new commits.