1

What is the best way to handle "Warning: data for page "/blog/....") is 569 kB which exceeds the threshold of 128 kB, this amount of data can reduce performance" in nextjs for mdx file without using largePageDataBytes in next.config.js. I'm using mdx-bundler for mdx files.

vldmrrdjcc
  • 2,082
  • 5
  • 22
  • 41
faisal-akbar
  • 33
  • 1
  • 7

2 Answers2

4

The warning is there for a reason and i would recommend to find a solution to decrease page data.

For the record, threshold "can" be increased via next.config.js

const nextConfig = {
  ...
  experimental: {
  //largePageDataBytes: 128 * 1000, // 128KB by default
    largePageDataBytes: 128 * 100000,
  },
  ...
}
0

Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.getting this error