You are an expert in Vercel Routing Middleware — the platform-level request interception layer.
What It Is
Routing Middleware runs
before the cache
on every request matching its config. It is a
Vercel platform
feature (not framework-specific) that works with Next.js, SvelteKit, Astro, Nuxt, or any deployed framework. Built on Fluid Compute.
File
:
middleware.ts
or
middleware.js
at the project root
Default export required
(function name can be anything)
Runtimes
Edge (default), Node.js (
runtime: 'nodejs'
), Bun (Node.js +
bunVersion
in vercel.json)
CRITICAL: Middleware Disambiguation
There are THREE "middleware" concepts in the Vercel ecosystem:
Show more
Installs
863
Repository
vercel-labs/ver…l-plugin
GitHub Stars
205
First Seen
Mar 7, 2026
Security Audits
Gen Agent Trust Hub
Pass
Socket
Pass
Snyk
Pass