This example shows how to analyze the output bundles using @next/bundle-analyzer
Preview the example live on StackBlitz:
Deploy the example using Vercel:
Execute create-next-app
with npm or Yarn to bootstrap the example:
npx create-next-app --example analyze-bundles analyze-bundles-app
# or
yarn create next-app --example analyze-bundles analyze-bundles-app
To analyze your webpack output, invoke the following command:
npm run analyze
# or
yarn analyze
Once the build is completed, you can inspect the bundle by running:
npm run serve
# or
yarn serve