Skip to content

Commit

Permalink
fix(nextjs): read nextConfig path correctly when provided as an option.
Browse files Browse the repository at this point in the history
closes: #20142
  • Loading branch information
ndcunningham committed Nov 14, 2023
1 parent 96043fb commit 35c620a
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 35c620a

Please sign in to comment.