mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
Noticed while doing some testing that this route was broken in this application. We use some parts of this app to generate statistics - I'm planning to use more of the routes for benchmarking so I wanted to ensure it was working. Closes NEXT-3371
23 lines
425 B
JavaScript
23 lines
425 B
JavaScript
import dynamic from 'next/dynamic'
|
|
|
|
const DynamicHello = dynamic(() =>
|
|
import('../components/hello').then((mod) => mod.Hello)
|
|
)
|
|
|
|
const Page = () => (
|
|
<>
|
|
<p>testing next/dynamic size</p>
|
|
<DynamicHello />
|
|
</>
|
|
)
|
|
|
|
// we add getServerSideProps to prevent static optimization
|
|
// to allow us to compare server-side changes
|
|
export const getServerSideProps = () => {
|
|
return {
|
|
props: {},
|
|
}
|
|
}
|
|
|
|
export default Page
|