H3 · Middleware
vite-doctor/h3middlewarewarnSuggestion
Why it happens
In H3 v1, app.use("/api", fn) ran for every path under /api. In H3 v2 a middleware path is a route pattern, so "/api" matches only /api itself and the middleware skips every nested route.
Fix
Add a wildcard, such as app.use("/api/**", fn), or keep the exact path when the middleware is meant for that one route.
Example
Match nested paths with a wildcard
Before
app.use("/api", auth)
After
app.use("/api/**", auth)
Verify the fix
Run only this rule after editing so the report stays focused on the diagnostic you are closing:
pnpm vite-doctor . --extends auto,h3/strict --rules h3/middleware/no-exact-path-use