diff --git a/docs/02-app/01-building-your-application/06-optimizing/13-memory-usage.mdx b/docs/02-app/01-building-your-application/06-optimizing/13-memory-usage.mdx index 70d12064ea678..2be24f847dc16 100644 --- a/docs/02-app/01-building-your-application/06-optimizing/13-memory-usage.mdx +++ b/docs/02-app/01-building-your-application/06-optimizing/13-memory-usage.mdx @@ -11,7 +11,7 @@ Let's explore some strategies and techniques to optimize memory and address comm Applications with a large amount of dependencies will use more memory. -The [Bundle Analyzer](/docs/app/building-your-application/optimizing/bundle-analyzer) can help you investigate large dependencies in your application that may be able to be removed to improve performance and memory usage. +The [Bundle Analyzer](/docs/app/building-your-application/optimizing/package-bundling#analyzing-javascript-bundles) can help you investigate large dependencies in your application that may be able to be removed to improve performance and memory usage. ## Run `next build` with `--experimental-debug-memory-usage` @@ -72,11 +72,11 @@ const nextConfig = { config, { buildId, dev, isServer, defaultLoaders, nextRuntime, webpack } ) => { - if (cfg.cache && !dev) { - cfg.cache = Object.freeze({ + if (config.cache && !dev) { + config.cache = Object.freeze({ type: 'memory', }) - cfg.cache.maxMemoryGenerations = 0 + config.cache.maxMemoryGenerations = 0 } // Important: return the modified config return config