From a799d25cfaf602c898ba3afa3a8cbd6f6eb7957b Mon Sep 17 00:00:00 2001 From: Jerome Leclanche Date: Thu, 25 Aug 2022 17:52:32 +0200 Subject: [PATCH] Mention `largePageDataBytes` in warning docs (#39941) Also fix the KB unit to `kB` (https://en.wikipedia.org/wiki/Kilobyte) ## Documentation / Examples - [ ] Make sure the linting passes by running `pnpm lint` - [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples) Co-authored-by: JJ Kasper --- 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..9969b380299e 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` if absolutely necessary and the performance implications are understood. ### Useful Links