From 1cb8063e3c9a9d33966d757b4b55ea8fb8969147 Mon Sep 17 00:00:00 2001 From: gabriel miranda Date: Thu, 19 Dec 2024 10:39:07 -0300 Subject: [PATCH] fix(react-email): Improper warnings --- .../utils/preview/hot-reloading/create-dependency-graph.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.ts b/packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.ts index 0dd7e0af25..01f84f2e65 100644 --- a/packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.ts +++ b/packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.ts @@ -146,12 +146,10 @@ export const createDependencyGraph = async (directory: string) => { if (pathWithExtension) { pathToDependencyFromDirectory = pathWithExtension; - } - - if (isDev) { + } else if (isDev) { // only warn about this on development as it is probably going to be irrelevant otherwise console.warn( - `Could not determine the file extension for the file at ${pathWithExtension}`, + `Could not determine the file extension for the file at ${pathToDependencyFromDirectory}`, ); } }