Skip to content

Commit

Permalink
fix(react-email): Add Windows support for build process (#1699)
Browse files Browse the repository at this point in the history
Co-authored-by: gabriel miranda <[email protected]>
  • Loading branch information
chuanxshi and gabrielmfern authored Oct 22, 2024
1 parent e029c47 commit 9e46fca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/react-email/build-preview-server.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { spawn } from 'node:child_process';
import fs from 'node:fs';

const nextBuildProcess = spawn('next', ['build'], {
const nextBuildProcess = spawn('pnpm', ['next', 'build'], {
detached: true,
stdio: "inherit"
shell: true,
stdio: 'inherit',
});

process.on('SIGINT', () => {
Expand All @@ -12,6 +13,7 @@ process.on('SIGINT', () => {

nextBuildProcess.on('exit', (code) => {
if (code !== 0) {
console.error(`next build failed with exit code ${code}`);
process.exit(code);
}

Expand All @@ -21,4 +23,3 @@ nextBuildProcess.on('exit', (code) => {
fs.mkdirSync('dist/preview', { recursive: true });
fs.renameSync('.next', 'dist/preview/.next');
});

1 comment on commit 9e46fca

@vercel
Copy link

@vercel vercel bot commented on 9e46fca Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

react-email-demo – ./apps/demo

react-email-demo.vercel.app
react-email-demo-resend.vercel.app
react-email-demo-git-main-resend.vercel.app
demo.react.email

Please sign in to comment.