Skip to content

Commit 8303f85

Browse files
authored
docs: add middleware section to NextJS guide in English and Russian (#813)
1 parent 07df2bb commit 8303f85

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

i18n/en/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ the FSD project structure inside the `src` folder. You should still also add the
109109

110110
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)][ext-app-router-stackblitz]
111111

112+
## Middleware
113+
114+
If you are using middleware in a project, it also needs to be moved from `src` to the root of the project. Otherwise, NextJS simply won't see it — middleware must be located strictly at the root next to `app` or `pages`.
115+
112116
## See also {#see-also}
113117

114118
- [(Thread) About the pages directory in NextJS](https://t.me/feature_sliced/3623)

i18n/ru/docusaurus-plugin-content-docs/current/guides/tech/with-nextjs.mdx

+5-1
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,13 @@ App Router стал стабильным в NextJS версии 13.4. App Router
108108

109109
[![Открыть в StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)][ext-app-router-stackblitz]
110110

111+
## Middleware
112+
113+
Если вы используете middleware в проекте, его также нужно переместить из `src` в корень проекта. Иначе NextJS просто не увидит его — middleware должен находиться строго в корне рядом с `app` или `pages`.
114+
111115
## См. также {#see-also}
112116

113117
- [(Тред) Про pages директорию в NextJS](https://t.me/feature_sliced/3623)
114118

115119
[project-knowledge]: /docs/about/understanding/knowledge-types
116-
[ext-app-router-stackblitz]: https://stackblitz.com/edit/stackblitz-starters-aiez55?file=README.md
120+
[ext-app-router-stackblitz]: https://stackblitz.com/edit/stackblitz-starters-aiez55?file=README.md

0 commit comments

Comments
 (0)