Skip to content

Commit b68e166

Browse files
committedAug 22, 2024
fix(react-email): Missing sharp warning when running email dev
1 parent 7ce855f commit b68e166

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
 

‎.changeset/empty-pugs-tap.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"react-email": patch
3+
---
4+
5+
Fix sharp warning when running `email dev`

‎packages/react-email/src/cli/utils/preview/start-dev-server.ts

+6
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ export const startDevServer = async (
129129
const app = next({
130130
// passing in env here does not get the environment variables there
131131
dev: isDev,
132+
conf: {
133+
images: {
134+
// This is to avoid the warning with sharp
135+
unoptimized: true
136+
}
137+
},
132138
hostname: 'localhost',
133139
port,
134140
dir: previewServerLocation,

0 commit comments

Comments
 (0)
Please sign in to comment.