mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
When you're using `config` object with `runtime` we'll show a warning and recomment you to move to `export const runtime = ...` for runtime property as it's documented as recommended. This PR adds a error for `next build` to avoid logs are truncated during multi-workers build and you're aware of the config which doesn't take effect with seeing the error Follow up for #48630 link [NEXT-426](https://linear.app/vercel/issue/NEXT-426)
25 lines
429 B
JavaScript
25 lines
429 B
JavaScript
import { use } from 'react'
|
|
import Runtime from '../../utils/runtime'
|
|
import Time from '../../utils/time'
|
|
|
|
async function getData() {
|
|
return {
|
|
type: 'SSR',
|
|
}
|
|
}
|
|
|
|
export const runtime = 'nodejs'
|
|
|
|
export default function Page(props) {
|
|
const { type } = use(getData())
|
|
return (
|
|
<div className="node-rsc-ssr">
|
|
This is a {type} RSC page.
|
|
<br />
|
|
<Runtime />
|
|
<br />
|
|
<Time />
|
|
</div>
|
|
)
|
|
}
|