Skip to content

Commit 1cb8063

Browse files
committed
fix(react-email): Improper warnings
1 parent 28b0db7 commit 1cb8063

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/react-email/src/cli/utils/preview/hot-reloading/create-dependency-graph.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,10 @@ export const createDependencyGraph = async (directory: string) => {
146146

147147
if (pathWithExtension) {
148148
pathToDependencyFromDirectory = pathWithExtension;
149-
}
150-
151-
if (isDev) {
149+
} else if (isDev) {
152150
// only warn about this on development as it is probably going to be irrelevant otherwise
153151
console.warn(
154-
`Could not determine the file extension for the file at ${pathWithExtension}`,
152+
`Could not determine the file extension for the file at ${pathToDependencyFromDirectory}`,
155153
);
156154
}
157155
}

0 commit comments

Comments
 (0)