fix /app-dir/middleware-matching turbopack test failure (#72098)
Context
- I only fixed webpack codepath for
https://github.com/vercel/next.js/pull/72056
- But we ended up merging it despite the fact the CI would fail due to
Github incident https://www.githubstatus.com/incidents/9yk1fbk0qjjc
Notes
- `middleware.rs` only runs in build time for production turbopack build
- without this fix, the test would fail on 404 for prod mode, but would
land on Chat page for dev mode