Skip to content

Commit 112ef61

Browse files
gwklineicyJoseph
andauthored
docs: add note clarifying project root in monorepo (#84628)
### What? - Adding a small note to clarify the meaning of the phrase "project root" in the documentation for next.config output, specifically in regards to a monorepo setup ### Why? - While doing some debugging related to a container that I cannot build locally for compliance reasons, I had to take shots in the dark to figure this behavior out 😄 hoping it can help the next soul who finds themselves in a similar predicament ### How? - Explain that in monorepos, "project root" does not mean the root of the monorepo, but instead the root of the nextjs app First time contributing, so I appreciate any reviews/feedback I can get here, even for such a small PR. Thanks! --------- Co-authored-by: Joseph <[email protected]> Co-authored-by: Joseph <[email protected]>
1 parent 4f19d01 commit 112ef61

File tree

1 file changed

+3
-0
lines changed
  • docs/01-app/03-api-reference/05-config/01-next-config-js

1 file changed

+3
-0
lines changed

docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ module.exports = {
7979

8080
- There are some cases in which Next.js might fail to include required files, or might incorrectly include unused files. In those cases, you can leverage `outputFileTracingExcludes` and `outputFileTracingIncludes` respectively in `next.config.js`. Each option accepts an object whose keys are **route globs** (matched with [picomatch](https://www.npmjs.com/package/picomatch#basic-globbing) against the route path, e.g. `/api/hello`) and whose values are **glob patterns resolved from the project root** that specify files to include or exclude in the trace.
8181

82+
> **Good to know**:
83+
> In a monorepo, `project root` refers to the Next.js project root (the folder containing next.config.js, e.g., packages/web-app), not necessarily the monorepo root.
84+
8285
```js filename="next.config.js"
8386
module.exports = {
8487
outputFileTracingExcludes: {

0 commit comments

Comments
 (0)