Skip to content

Commit

Permalink
Mention largePageDataBytes in warning docs (#39941)
Browse files Browse the repository at this point in the history
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 <jj@jjsweb.site>
  • Loading branch information
jleclanche and ijjk committed Aug 25, 2022
1 parent 9a7a8ac commit a799d25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions errors/large-page-data.md
Expand Up @@ -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

Expand Down

0 comments on commit a799d25

Please sign in to comment.