Skip to content

Commit

Permalink
Add additional stats app pages (#27202)
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jul 16, 2021
1 parent 6e99f7a commit 4b1bf75
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/.stats-app/components/hello.js
@@ -0,0 +1,3 @@
export const Hello = () => {
return <p>hello world</p>
}
20 changes: 20 additions & 0 deletions test/.stats-app/pages/dynamic.js
@@ -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 changes: 21 additions & 0 deletions test/.stats-app/pages/head.js
@@ -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 changes: 18 additions & 0 deletions test/.stats-app/pages/script.js
@@ -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

0 comments on commit 4b1bf75

Please sign in to comment.