如何修改Next.js中的largePageDataBytes?

k K*_*k K 8 javascript next.js

我想更改 largePageDataBytes 我知道这会降低性能。我在 next.config.js 中尝试了以下操作

/**
 * @type {import('next').NextConfig}
 */
const nextConfig = {
  /* config options here */
  //largePageDataBytes: 128 * 1000, // 128KB by default
  largePageDataBytes: 128 * 100000,
};

module.exports = nextConfig;
Run Code Online (Sandbox Code Playgroud)

并得到了

warn - Invalid next.config.js options detected:
Run Code Online (Sandbox Code Playgroud)

在哪里以及如何更改largePageDataBytes?

arm*_*6er 22

根据代码,experimental它目前预计位于该物业内。

const nextConfig = {
  ...
  experimental: {
    largePageDataBytes: 128 * 100000,
  },
  ...
}
Run Code Online (Sandbox Code Playgroud)