Skip to content

Commit

Permalink
fix(nextjs): read nextConfig path correctly when provided as an optio…
Browse files Browse the repository at this point in the history
…n. (#20241)
  • Loading branch information
ndcunningham committed Nov 14, 2023
1 parent 96043fb commit b1bb892
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export function findNextConfigPath(
): string {
if (userDefinedConfigPath) {
const file = userDefinedConfigPath;
if (existsSync(file)) return file;
if (existsSync(join(dirname, file))) return file;
throw new Error(
`Cannot find the Next.js config file: ${userDefinedConfigPath}. Is the path correct in project.json?`
);
Expand Down

0 comments on commit b1bb892

Please sign in to comment.