Skip to content

Commit

Permalink
[docs] Add precision about pageExtensions (#40016)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
yoannmoinet and ijjk committed Aug 28, 2022
1 parent 4f36064 commit 1b61d1f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/advanced-features/middleware.md
Expand Up @@ -50,6 +50,8 @@ export const config = {
}
```

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

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

0 comments on commit 1b61d1f

Please sign in to comment.