next.js
aced0cfb - docs: add middleware.mdx deprecation stub for discoverability (#92281)

Commit
13 days ago
docs: add middleware.mdx deprecation stub for discoverability (#92281) ### What? Add a `middleware.mdx` deprecation stub to the app-router file conventions docs so that searching for `*middleware*` in the bundled docs returns a result. - `docs/01-app/03-api-reference/03-file-conventions/middleware.mdx` — explains the v16 rename and links to the `proxy.js` API reference, including the codemod command. ### Why? The `middleware.ts` convention was renamed to `proxy.ts` in v16, but "middleware" remains the widely understood term. Searching `node_modules/next/dist/docs/01-app` for any file named `*middleware*` currently returns zero results, which is confusing for both human developers and AI coding agents that look up documentation by concept name. This stub ensures the term "middleware" is discoverable and immediately points users to the correct `proxy` docs. ### How? One new `.mdx` file — no changes to existing files. The `copy_docs` build task already globs `**/*` and renames `.mdx` → `.md`, so it will automatically appear as `middleware.md` in `dist/docs/` on the next build. ## PR checklist (Fixing a bug) - This is a docs-only change, no code or tests affected. - See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors should have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md
Author
Parents
Loading