rsnext/examples/analyze-bundles
Qurage f9e4f18691 Update example analyze bundles (#9645)
* Update analyze-bundles example

* follow these updates:
  1. `server` and `browser` options
    * 9ecca7b492/packages/next-bundle-analyzer/index.js
  2. "Deprecate next-bundle-analyzer"
    * e453804d07 (diff-5cea9b17189292d8fedc98eeda86bb0b)
  3. "Move next-bundle-analyzer to Next.js repo"
    * 42cff0a09c (diff-4e57124572a8e05f52d373c300523f6a)
    * "Remove options from bundle-analyzer"

* Support Windows in analyze bundles example

* Remove empty webpack config from analyze bundle example

* 4943d844cc (r354844766)
2019-12-07 15:33:08 +01:00
..
pages Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
next.config.js Update example analyze bundles (#9645) 2019-12-07 15:33:08 +01:00
package.json Update example analyze bundles (#9645) 2019-12-07 15:33:08 +01:00
README.md Update example analyze bundles (#9645) 2019-12-07 15:33:08 +01:00

Analyzer Bundles example

Deploy your own

Deploy the example using ZEIT Now:

Deploy with ZEIT Now

How to use

Using create-next-app

Execute create-next-app with Yarn or npx 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

Download manually

Download the example:

curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 next.js-canary/examples/analyze-bundles
cd analyze-bundles

Install it

npm install
npm run dev
# or
yarn
yarn dev

The idea behind the example

This example shows how to analyze the output bundles using @next/bundle-analyzer

To analyze your webpack output, invoke the following command:

npm run analyze
# or
yarn analyze