From eb8d50eeeb8fee2c6be22127093acf5f57739b60 Mon Sep 17 00:00:00 2001 From: Gavin Kline Date: Wed, 8 Oct 2025 01:56:06 -0400 Subject: [PATCH 1/2] docs: add note clarifying project root in monorepo --- .../03-api-reference/05-config/01-next-config-js/output.mdx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx b/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx index 4d068fa1bba8d7..6a90ac54dd9289 100644 --- a/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx +++ b/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx @@ -79,6 +79,9 @@ module.exports = { - 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. +> **Good to know**: +> In a monorepo, "project root" refers to the root of the Next.js app or package (e.g., `packages/web-app`), not necessarily the monorepo root. + ```js filename="next.config.js" module.exports = { outputFileTracingExcludes: { From c243dfa8f1e6c420066460985001e75302607a64 Mon Sep 17 00:00:00 2001 From: Joseph Date: Wed, 8 Oct 2025 16:07:40 -0700 Subject: [PATCH 2/2] Update docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx --- .../03-api-reference/05-config/01-next-config-js/output.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx b/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx index 41d54622e7f056..5e06e34a98af8b 100644 --- a/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx +++ b/docs/01-app/03-api-reference/05-config/01-next-config-js/output.mdx @@ -80,7 +80,7 @@ module.exports = { - 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. > **Good to know**: -> In a monorepo, "project root" refers to the root of the Next.js app or package (e.g., `packages/web-app`), not necessarily the monorepo root. +> 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. ```js filename="next.config.js" module.exports = {