diff --git a/test/.stats-app/components/hello.js b/test/.stats-app/components/hello.js new file mode 100644 index 0000000000..b651f82bc1 --- /dev/null +++ b/test/.stats-app/components/hello.js @@ -0,0 +1,3 @@ +export const Hello = () => { + return

hello world

+} diff --git a/test/.stats-app/pages/dynamic.js b/test/.stats-app/pages/dynamic.js new file mode 100644 index 0000000000..d1f0d57509 --- /dev/null +++ b/test/.stats-app/pages/dynamic.js @@ -0,0 +1,20 @@ +import dynamic from 'next/dynamic' + +const DynamicHello = dynamic(() => import('../components/hello')) + +const Page = () => ( + <> +

testing next/dynamic size

+ + +) + +// we add getServerSideProps to prevent static optimization +// to allow us to compare server-side changes +export const getServerSideProps = () => { + return { + props: {}, + } +} + +export default Page diff --git a/test/.stats-app/pages/head.js b/test/.stats-app/pages/head.js new file mode 100644 index 0000000000..2e3912c0b9 --- /dev/null +++ b/test/.stats-app/pages/head.js @@ -0,0 +1,21 @@ +import Head from 'next/head' + +const Page = () => ( + <> + + hello world + + +

testing next/head size

+ +) + +// we add getServerSideProps to prevent static optimization +// to allow us to compare server-side changes +export const getServerSideProps = () => { + return { + props: {}, + } +} + +export default Page diff --git a/test/.stats-app/pages/script.js b/test/.stats-app/pages/script.js new file mode 100644 index 0000000000..b359825048 --- /dev/null +++ b/test/.stats-app/pages/script.js @@ -0,0 +1,18 @@ +import Script from 'next/script' + +const Page = () => ( + <> +

testing next/dynamic size

+