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)

(cherry picked from commit b1bb892)
  • Loading branch information
ndcunningham authored and FrozenPandaz committed Nov 17, 2023
1 parent 8bf3199 commit 57d751c
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 57d751c

Please sign in to comment.