Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

gatsby-plugin-webpack-bundle-analyser-v2

JimmyBeldone152.6kMIT1.1.32

Gatsby plugin with the latest version of webpack-bundle-analyser to visualize size of output files with an interactive zoomable treemap.

gatsby, gatsby-plugin, gatsby-plugin-webpack-bundle-analyser-v2, webpack-bundle-analyser, webpack, analyser, bundle

readme

gatsby-plugin-webpack-bundle-analyser-v2

Gatsby plugin with the latest version of webpack-bundle-analyser to visualize size of output files with an interactive zoomable treemap.

travis build travis build npm version NPM downloads dependencies status dev dependencies status

commitizen semantic-release prettier license

Install

npm i gatsby-plugin-webpack-bundle-analyser-v2 -D

or

yarn add gatsby-plugin-webpack-bundle-analyser-v2 -D

Usage

Include the plugin in your gatsby-config.js file :

/* gatsby-config.js */

module.exports = {
  plugins: [
      "gatsby-plugin-webpack-bundle-analyser-v2"
  ]
}

Then run a build as normal and the plugin will automatically open a browser window with the bundle analysis.

Options

This plugin is disabled in development environment (when process.env.NODE_ENV is development) by default.\ If you want to use it in development environment, set devMode: true like this:

// in gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: "gatsby-plugin-webpack-bundle-analyser-v2",
      options: {
        devMode: true,
      },
    },
  ],
}

Optionally you can disable the analyser, just add disable: true in options : {}

Original plugin options

You can add all available options of webpack-bundle-analyser original plugin like this :

// in gatsby-config.js

module.exports = {
  plugins: [
    {
      resolve: "gatsby-plugin-webpack-bundle-analyser-v2",
      options: {
        analyzerMode: "server",
        analyzerPort: "8888",
        analyzerHost: "http://myhost.com",
        defaultSizes: "gzip"
      },
    },
  ],
}

In this plugin, the default original options are :

{
  analyzerMode: 'server',
  analyzerPort: 3001,
}

which run a server on http://127.0.0.1:3001 with your bundle report.

Note for Gatsby Cloud users :

Default options for Gatsby Cloud users change a bit, analyzerMode is set to static, and a report.html will be generated in /public folder.

Contributing

Contributions are welcome ! See contributing guidelines

License

MIT

Copyright (c) 2019 Jimmy Beldone

changelog

1.1.32 (2023-11-16)

Bug Fixes

  • 🐛 update dependencies (8fd3ae7)
  • 🐛 update git workflows (98732a2)

1.1.31 (2023-05-03)

Bug Fixes

  • 🐛 gatsby v5 peerDependency (ba7be77)
  • 🐛 upgrade webpack-bundle-analyzer to @4.8.0 (acb6046)

1.1.30 (2022-10-17)

Bug Fixes

1.1.29 (2022-10-17)

Bug Fixes

1.1.28 (2022-10-17)

Bug Fixes

  • update webpack-bundle-analyzer to @4.6.1 (02bd491)

1.1.27 (2022-03-19)

Bug Fixes

1.1.26 (2021-11-11)

Bug Fixes

1.1.25 (2021-09-01)

Bug Fixes

  • update dev dependencies (4f6bf44)

1.1.24 (2021-06-23)

Bug Fixes

  • 🐛 update dependencies (8674159)

1.1.23 (2021-06-23)

Bug Fixes

  • 🐛 update dev dependencies (dd6fae4)
  • 🐛 update webpack-bundle-analyzer to @4.4.2 (bed8ff9)

1.1.22 (2021-04-13)

Bug Fixes

  • 🐛 update dev dependencies (a8cd6eb)
  • 🐛 update webpack-bundle-analyzer to @4.4.1 (5789f2b)

1.1.21 (2021-03-09)

Bug Fixes

1.1.20 (2021-01-24)

Bug Fixes

1.1.19 (2021-01-24)

Bug Fixes

  • update webpack-bundle-analyzer to @4.4.0 (df288af)

1.1.18 (2020-12-08)

Bug Fixes

  • update webpack-bundle-analyzer to @4.2.0 (a1433c1)

1.1.17 (2020-11-23)

Bug Fixes

1.1.16 (2020-11-13)

Bug Fixes

  • change default options for Gatsby Cloud (c3db3ee)

1.1.15 (2020-11-13)

Bug Fixes

1.1.14 (2020-11-13)

Bug Fixes

  • update webpack-bundle-analyzer to @4.1.0 (8142fca)

1.1.13 (2020-09-28)

Bug Fixes

  • update dependencies (ca87992)
  • update webpack-bundle-analyzer to @3.9.0 (540852f)

1.1.12 (2020-08-13)

Bug Fixes

1.1.11 (2020-07-31)

Bug Fixes

1.1.10 (2020-05-28)

Bug Fixes

  • update webpack-bundle-analyzer to 3.8.0 (629251d)

1.1.9 (2020-04-28)

Bug Fixes

1.1.8 (2019-11-09)

Bug Fixes

  • deps: update dependency webpack-bundle-analyzer to 3.6.0 (4f220c0)

1.1.7 (2019-10-04)

Bug Fixes

  • deps: update webpack-bundle-analyzer to 3.5.2 (92f06cb)

1.1.6 (2019-10-04)

Bug Fixes

  • .snyk & package.json to reduce vulnerabilities (13d58fa)

1.1.5 (2019-07-25)

Bug Fixes

  • deps: roll back dependency snyk to ^1.199.2 (ea7a3bd)

1.1.4 (2019-07-24)

Bug Fixes

  • deps: update dependency snyk to v2 (beabdc9)

1.1.3 (2019-07-08)

Bug Fixes

  • .snyk & package.json to reduce vulnerabilities (2f8b4b8)

1.1.2 (2019-07-05)

Bug Fixes

  • .snyk & package.json to reduce vulnerabilities (6cda166)

1.1.1 (2019-06-23)

Performance Improvements

1.1.0 (2019-05-17)

Features

  • gatsby-node.js: add devMode option (5e1df4b), closes #2