Skip to content

Commit 1d14411

Browse files
authored
fix(preview-server): multiple lockfile warnings (#2703)
1 parent 7b5f27b commit 1d14411

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changeset/warm-jars-show.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-email/preview-server": patch
3+
---
4+
5+
fix multiple lockfile warning during email build

packages/react-email/src/commands/build.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,17 @@ const setNextEnvironmentVariablesForBuild = async (
7979
import path from 'path';
8080
const emailsDirRelativePath = path.normalize('${emailsDirRelativePath}');
8181
const userProjectLocation = '${process.cwd().replace(/\\/g, '/')}';
82+
const previewServerLocation = '${builtPreviewAppPath.replace(/\\/g, '/')}';
8283
/** @type {import('next').NextConfig} */
8384
const nextConfig = {
8485
env: {
8586
NEXT_PUBLIC_IS_BUILDING: 'true',
8687
EMAILS_DIR_RELATIVE_PATH: emailsDirRelativePath,
8788
EMAILS_DIR_ABSOLUTE_PATH: path.resolve(userProjectLocation, emailsDirRelativePath),
88-
PREVIEW_SERVER_LOCATION: '${builtPreviewAppPath.replace(/\\/g, '/')}',
89+
PREVIEW_SERVER_LOCATION: previewServerLocation,
8990
USER_PROJECT_LOCATION: userProjectLocation
9091
},
92+
outputFileTracingRoot: previewServerLocation,
9193
serverExternalPackages: ['esbuild'],
9294
typescript: {
9395
ignoreBuildErrors: true

0 commit comments

Comments
 (0)