Vercel
Releases
Performance
Cost
Middleware missing config.matcher (runs on all routes)
Part of the Edge runtime readiness check · fix arrives as a guide
What it is
A middleware.ts file exports no config.matcher, so it runs on every request.
Why it matters
Without a matcher it executes for static assets, images, and prefetches as well as pages. That is invocation cost and added latency on requests that had no reason to involve it.
How to fix it
Add a config.matcher listing the paths that genuinely need middleware, and exclude _next/static, _next/image, and asset extensions.
Run them all on your app
Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.