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.
Asked
Active
Viewed 3,047 times
2 Answers
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,
},
...
}

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

Rahul Kumar
- 11
- 1