How to analyze and optimize your app’s bundle size
next.config.ts
file that is configured to use the analyzer when the ANALYZE
environment variable is set to true
.
client
, nodejs
and edge
. Each one shows a treemap, describing the size and impact of modules loaded on that particular environment.
You can then work on optimizing your app by removing or dynamically loading the heaviest modules.