Next.js Config

Bundle Analysis

How to analyze and optimize your app's bundle size

@repo/next-config wires @next/bundle-analyzer into every app's next.config.ts. The analyzer runs when the ANALYZE environment variable is true.

Usage

From the repo root:

Terminal
bun run analyze

Turborepo runs the analyzer for each app. Each run opens three HTML treemaps in the default browser — client, nodejs and edge — showing the size and impact of the modules loaded in that environment.

On this page

GitHubEdit this page on GitHub