Skip to content

Support next.config.js in parent directories #24

Closed
@ehmicky

Description

@ehmicky

In a monorepo setup, it is possible that next.config.js might be in a parent directory if the user has set a base directory.
Next.js is searching next.config.js in parent directories using find-up:

https://github.com/vercel/next.js/blob/497cac4b93de9ecf6c7ed79bd6557dcd3bb51be5/packages/next/next-server/server/config.ts#L450

However we are not currently searching it in parent directories:

https://github.com/netlify/netlify-plugin-nextjs/blob/2849dc5f7c57e9fd827a939e067a871e4cb487b1/index.js#L57

Using find-up should fix this bug.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions