0eb9f7e76d
Part of #31506 and https://github.com/vercel/next.js/discussions/34179. This PR ensures that in the `nodejs` runtime, the flight data is statically stored as a JSON file if possible. Most of the touched code is related to conditions of static/SSG/SSR when runtime and/or RSC is involved. ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
44 lines
970 B
JavaScript
44 lines
970 B
JavaScript
import Runtime from '../utils/runtime'
|
|
import Time from '../utils/time'
|
|
|
|
import Link from 'next/link'
|
|
|
|
export default function Page() {
|
|
return (
|
|
<div>
|
|
This is a static page.
|
|
<br />
|
|
<Runtime />
|
|
<br />
|
|
<Time />
|
|
<br />
|
|
<Link href="/node-rsc">
|
|
<a id="link-node-rsc">to /node-rsc</a>
|
|
</Link>
|
|
<br />
|
|
<Link href="/node-rsc-ssg">
|
|
<a id="link-node-rsc-ssg">to /node-rsc-ssg</a>
|
|
</Link>
|
|
<br />
|
|
<Link href="/node-rsc-ssr">
|
|
<a id="link-node-rsc-ssr">to /node-rsc-ssr</a>
|
|
</Link>
|
|
<br />
|
|
<Link href="/node-rsc-isr">
|
|
<a id="link-node-rsc-isr">to /node-rsc-isr</a>
|
|
</Link>
|
|
<br />
|
|
<Link href="/node-ssg">
|
|
<a id="link-node-ssg">to /node-ssg</a>
|
|
</Link>
|
|
<br />
|
|
<Link href="/node-ssr">
|
|
<a id="link-node-ssr">to /node-ssr</a>
|
|
</Link>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export const config = {
|
|
runtime: 'nodejs',
|
|
}
|