Skip to content

Commit 1b61d1f

Browse files
yoannmoinetijjk
andauthored
[docs] Add precision about pageExtensions (#40016)
Adding a precision because when you change the `pageExtensions` configuration in `next.config.js`, `middleware.ts` isn't recognized anymore. Took me some time to debug this one, not sure if it should be considered a bug or just lack of documentation. I'll let you be the judge of that. ## Documentation / Examples - [x] Make sure the linting passes by running `pnpm lint` - [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples) Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
1 parent 4f36064 commit 1b61d1f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/advanced-features/middleware.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ export const config = {
5050
}
5151
```
5252

53+
> **Note** the `pageExtensions` config affects middleware as well, [see related documentation here](/docs/api-reference/next.config.js/custom-page-extensions.md).
54+
5355
## Matching Paths
5456

5557
Middleware will be invoked for **every route in your project**. The following is the execution order:

0 commit comments

Comments
 (0)