Vercel
Releases
Performance
Cost
Stability
Edge runtime readiness
Code on the edge runtime that does not belong there.
Overview
The edge runtime is not Node. lumioguard reads your edge routes and middleware for Node-only APIs, dependencies that will not run or will not fit, and work patterns that give up the latency the edge was chosen for.
What it looks for
- Node-only APIs used in edge runtime code
- Node-incompatible or oversized dependencies in an edge bundle
- Database and network work inside middleware.ts
- Middleware with no config.matcher, running on every route
- Edge data-fetch routes with no preferredRegion set
Why it matters
Middleware runs on every matching request, so a database round trip inside it is added to every page load in your app. Middleware with no config.matcher runs on every route including static assets.
Rules in this check
| What it reports | Fix path |
|---|---|
| Node-only API in edge runtime | Guide |
| Node-incompatible or oversized dependency in edge runtime | Guide |
| Heavy DB/network work in middleware.ts | Guide |
| Middleware missing config.matcher (runs on all routes) | Guide |
| Edge data-fetch route missing preferredRegion | Guide |
How the fixes arrive
GuideChanges only you can make safely arrive as a step-by-step guide you can follow yourself or hand to your coding agent.
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.