Repository: next.js
Issue: `maxDuration` not honored for pages defining parallel routes
Labels: bug,Parallel & Intercepting Routes

### Link to the code that reproduces this issue

https://github.com/spencerwilson/nextjs-maxDuration-repro

### To Reproduce

1. Run `npm run build` on https://github.com/spencerwilson/nextjs-maxDuration-repro/commit/c6a491b4e71bec9b98b22184e970526cab640adb and observe:
```
$ jq . .next/server/functions-config-manifest.json
{
  "version": 1,
  "functions": {
    "/": {
      "maxDuration": 6
    }
  }
}
```
2. Run `npm run build` on https://github.com/spencerwilson/nextjs-maxDuration-repro/commit/1b5f8ee4fded20e0abac6afcf1d3c58d2e249760 and observe:
```
$ jq . .next/server/functions-config-manifest.json
{
  "version": 1,
  "functions": {}
}
```

The difference between those two revisions - [diff](https://github.com/spencerwilson/nextjs-maxDuration-repro/commit/1b5f8ee4fded20e0abac6afcf1d3c58d2e249760) - is that the index page's `maxDuration` _stops_ being reported in this build output when the filesystem includes at least one parallel route slot in a page's directory. In this case I added an app/@other/ slot.

### Current vs. Expected behavior

As far as I can tell there are no docs, on https://nextjs.org/docs/app/building-your-application/routing/parallel-routes or elsewhere, describing any coupling between a) parallel routes, and b) `maxDuration`. Therefore, I expected that `maxDuration` would always be emitted, even if the page is using parallel routes.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 18.19.1
  npm: 10.2.4
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.0-canary.10 // Latest available version is detected (14.2.0-canary.10).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure, App Router

### Which stage(s) are affected? (Select all that apply)

next build (local), Vercel (Deployed)

### Additional context

I'm new to Next.js so have no idea what canary release might have introduced this.

This issue came to my attention when I observed that my attempts to use `maxDuration` to increase my hosting platform's timeout were not having an effect. In the repro example, honoring `maxDuration` would mean a 6-second timeout, but my hosting platform (Vercel) observed 10 s still:
<img width="573" alt="image" src="https://github.com/vercel/next.js/assets/5624115/def38ba1-4fe5-4b75-ba0f-4d10055683f3">

I'm not 100% sure in the relevance of .next/server/functions-config-manifest.json , but it does perfectly correlate with my hosting platform doing what I expect to w/ the `next build` output—or not doing what I expect, as the case may be.

If this is expected behavior for some subtle technical reason, please consider updating the Next.js docs to explain how using parallel routes is expected to affect any route segment config such as `maxDuration`. Thank you!