2017-09-28 22:03:59 +02:00
# Webpack Bundle Size Analyzer
2020-01-16 23:23:56 +01:00
This example shows how to analyze the output bundles using [webpack-bundle-size-analyzer ](https://www.npmjs.com/package/webpack-bundle-size-analyzer )
2017-09-28 22:03:59 +02:00
## How to use
2020-05-27 23:51:11 +02:00
Execute [`create-next-app` ](https://github.com/vercel/next.js/tree/canary/packages/create-next-app ) with [npm ](https://docs.npmjs.com/cli/init ) or [Yarn ](https://yarnpkg.com/lang/en/docs/cli/create/ ) to bootstrap the example:
2017-12-03 05:30:17 +01:00
2018-03-14 09:09:46 +01:00
```bash
2020-06-01 19:36:57 +02:00
npx create-next-app --example with-webpack-bundle-size-analyzer with-webpack-bundle-size-analyzer-app
2018-03-14 09:09:46 +01:00
# or
yarn create next-app --example with-webpack-bundle-size-analyzer with-webpack-bundle-size-analyzer-app
2017-12-03 05:30:17 +01:00
```
2020-01-16 23:23:56 +01:00
## Notes
2017-09-28 22:03:59 +02:00
To analyze your webpack output, invoke the following command:
```bash
npm run analyze
2018-04-03 14:19:05 +02:00
# or
yarn analyze
2017-09-28 22:03:59 +02:00
```