From b812c79e2fbdf9de17f781adc52879a8903e0f0b Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Thu, 25 Aug 2022 16:58:06 +0200 Subject: [PATCH 1/2] Mention `largePageDataBytes` in warning docs --- errors/large-page-data.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/errors/large-page-data.md b/errors/large-page-data.md index b42c86a51fbe..3e862176bdef 100644 --- a/errors/large-page-data.md +++ b/errors/large-page-data.md @@ -2,11 +2,11 @@ #### Why This Error Occurred -One of your pages includes a large amount of page data (>= 128KB). This can negatively impact performance since page data must be parsed by the client before the page is hydrated. +One of your pages includes a large amount of page data (>= 128kB). This can negatively impact performance since page data must be parsed by the client before the page is hydrated. #### Possible Ways to Fix It -Reduce the amount of data returned from `getStaticProps`, `getServerSideProps`, or `getInitialProps` to only the essential data to render the page. +Reduce the amount of data returned from `getStaticProps`, `getServerSideProps`, or `getInitialProps` to only the essential data to render the page. The default threshold of 128kB can be configured in `largePageDataBytes`. ### Useful Links From 094a902e1ab2a140c600b32dab681ebf641ff18a Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Thu, 25 Aug 2022 10:47:05 -0500 Subject: [PATCH 2/2] Apply suggestions from code review --- errors/large-page-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/errors/large-page-data.md b/errors/large-page-data.md index 3e862176bdef..9969b380299e 100644 --- a/errors/large-page-data.md +++ b/errors/large-page-data.md @@ -6,7 +6,7 @@ One of your pages includes a large amount of page data (>= 128kB). This can nega #### Possible Ways to Fix It -Reduce the amount of data returned from `getStaticProps`, `getServerSideProps`, or `getInitialProps` to only the essential data to render the page. The default threshold of 128kB can be configured in `largePageDataBytes`. +Reduce the amount of data returned from `getStaticProps`, `getServerSideProps`, or `getInitialProps` to only the essential data to render the page. The default threshold of 128kB can be configured in `largePageDataBytes` if absolutely necessary and the performance implications are understood. ### Useful Links