fix: NextConfig.rewrites type for fallback (#75784)
### What?
Below is a snippet for [Incremental adoption of
Next.js](https://nextjs.org/docs/app/api-reference/config/next-config-js/rewrites#incremental-adoption-of-nextjs)
configuration.
```typescript
module.exports = {
async rewrites() {
return {
fallback: [
{
source: '/:path*',
destination: `https://custom-routes-proxying-endpoint.vercel.app/:path*`,
},
],
}
},
}
```
But `rewrites` in `NextConfig` type requires `beforeFiles` and
`afterFiles` besides `fallback`, which makes above configuration invalid
for TypeScript.
### Why?
I assume snippets from official documentation must work.
### How?
This PR makes `beforeFiles` and `afterFiles` optional.
---------
Co-authored-by: JJ Kasper <jj@jjsweb.site>