Add additional stats app pages (#27202)
This commit is contained in:
parent
6e99f7af39
commit
4b1bf758b0
4 changed files with 62 additions and 0 deletions
3
test/.stats-app/components/hello.js
Normal file
3
test/.stats-app/components/hello.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
export const Hello = () => {
|
||||
return <p>hello world</p>
|
||||
}
|
20
test/.stats-app/pages/dynamic.js
Normal file
20
test/.stats-app/pages/dynamic.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import dynamic from 'next/dynamic'
|
||||
|
||||
const DynamicHello = dynamic(() => import('../components/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
|
21
test/.stats-app/pages/head.js
Normal file
21
test/.stats-app/pages/head.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
import Head from 'next/head'
|
||||
|
||||
const Page = () => (
|
||||
<>
|
||||
<Head>
|
||||
<title>hello world</title>
|
||||
</Head>
|
||||
|
||||
<p>testing next/head size</p>
|
||||
</>
|
||||
)
|
||||
|
||||
// we add getServerSideProps to prevent static optimization
|
||||
// to allow us to compare server-side changes
|
||||
export const getServerSideProps = () => {
|
||||
return {
|
||||
props: {},
|
||||
}
|
||||
}
|
||||
|
||||
export default Page
|
18
test/.stats-app/pages/script.js
Normal file
18
test/.stats-app/pages/script.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
import Script from 'next/script'
|
||||
|
||||
const Page = () => (
|
||||
<>
|
||||
<p>testing next/dynamic size</p>
|
||||
<Script dangerouslySetInnerHTML={{ __html: `console.log("hello")` }} />
|
||||
</>
|
||||
)
|
||||
|
||||
// we add getServerSideProps to prevent static optimization
|
||||
// to allow us to compare server-side changes
|
||||
export const getServerSideProps = () => {
|
||||
return {
|
||||
props: {},
|
||||
}
|
||||
}
|
||||
|
||||
export default Page
|
Loading…
Reference in a new issue