{"id":20055,"library":"gatsby-plugin-webpack-bundle-analyser-v2","title":"Gatsby Plugin Webpack Bundle Analyser v2","description":"A Gatsby plugin that integrates webpack-bundle-analyzer to visualize bundle output sizes with an interactive zoomable treemap. Current stable version is 1.1.32, updated irregularly. Supports Gatsby v4 and v5. Key differentiator: provides the latest webpack-bundle-analyzer version compared to original gatsby-plugin-webpack-bundle-analyser, and is ESM-compatible. Plugin is disabled in development by default; requires manual devMode option to enable during development.","status":"active","version":"1.1.32","language":"javascript","source_language":"en","source_url":"https://github.com/JimmyBeldone/gatsby-plugin-webpack-bundle-analyser-v2","tags":["javascript","gatsby","gatsby-plugin","gatsby-plugin-webpack-bundle-analyser-v2","webpack-bundle-analyser","webpack","analyser","bundle"],"install":[{"cmd":"npm install gatsby-plugin-webpack-bundle-analyser-v2","lang":"bash","label":"npm"},{"cmd":"yarn add gatsby-plugin-webpack-bundle-analyser-v2","lang":"bash","label":"yarn"},{"cmd":"pnpm add gatsby-plugin-webpack-bundle-analyser-v2","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency; plugin extends Gatsby's webpack config.","package":"gatsby","optional":false},{"reason":"Core dependency; provides the bundle analysis functionality.","package":"webpack-bundle-analyzer","optional":false}],"imports":[{"note":"String shorthand works for defaults; object form needed for custom options.","wrong":"module.exports = { plugins: ['gatsby-plugin-webpack-bundle-analyser-v2'] }","symbol":"Plugin Configuration","correct":"module.exports = { plugins: [{ resolve: 'gatsby-plugin-webpack-bundle-analyser-v2', options: { analyzerMode: 'server' } }] }"},{"note":"Plugin is configured via gatsby-config.js, not imported and instantiated directly.","wrong":"const plugin = require('gatsby-plugin-webpack-bundle-analyser-v2'); module.exports = { plugins: [plugin] }","symbol":"Use in gatsby-config.js with options","correct":"module.exports = { plugins: [ { resolve: 'gatsby-plugin-webpack-bundle-analyser-v2', options: { devMode: true } } ] }"},{"note":"devMode expects boolean, not string.","wrong":"options: { devMode: 'true' }","symbol":"Dev mode activation","correct":"options: { devMode: true }"}],"quickstart":{"code":"// gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: 'gatsby-plugin-webpack-bundle-analyser-v2',\n      options: {\n        analyzerMode: 'server',\n        analyzerPort: 3001,\n        defaultSizes: 'gzip',\n      },\n    },\n  ],\n};\n\n// Run build: gatsby build\n// Browser opens automatically with bundle analysis.","lang":"javascript","description":"Configures the plugin with custom analyzer options and runs a build to open the bundle analysis in a browser."},"warnings":[{"fix":"Add options: { devMode: true } to plugin configuration in gatsby-config.js.","message":"Plugin is disabled in development mode by default. Builds will not open analyzer unless devMode: true is set.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure Gatsby version satisfies peer dependency (^4.0.0 || ^5.0.0). If issues arise, pin plugin version to 1.1.25.","message":"The plugin uses webpack-bundle-analyzer v4+, which may break if Gatsby's webpack version is incompatible.","severity":"gotcha","affected_versions":">=1.1.26"},{"fix":"Use gatsby-plugin-webpack-bundle-analyzer if you need more active maintenance.","message":"gatsby-plugin-webpack-bundle-analyser-v2 may be less actively maintained; check for updates or consider alternatives like gatsby-plugin-webpack-bundle-analyzer.","severity":"deprecated","affected_versions":">=1.1.32"}],"env_vars":null,"search_vec":"'1.1.32':30 'analys':5,56,87,92,94 'analyz':15,46 'bundl':4,14,18,45,55,86,91,95 'compar':48 'compat':61 'current':26 'default':68 'develop':66,76 'devmod':71 'differenti':39 'disabl':64 'enabl':74 'esm':60 'esm-compat':59 'gatsbi':1,8,34,52,78,80,83 'gatsby-plugin':79 'gatsby-plugin-webpack-bundle-analys':51 'gatsby-plugin-webpack-bundle-analyser-v2':82 'integr':11 'interact':23 'irregular':32 'javascript':77 'key':38 'latest':42 'manual':70 'option':72 'origin':50 'output':19 'plugin':2,9,53,62,81,84 'provid':40 'requir':69 'size':20 'stabl':27 'support':33 'treemap':25 'updat':31 'v2':6,88 'v4':35 'v5':37 'version':28,47 'visual':17 'webpack':3,13,44,54,85,90,93 'webpack-bundle-analys':89 'webpack-bundle-analyz':12,43 'zoomabl':24","created_at":"2026-04-25T11:21:05.573839+00:00","updated_at":"2026-04-25T11:21:05.573839+00:00","problems":[{"fix":"Run npm install webpack-bundle-analyzer --save-dev","cause":"Missing dependency of webpack-bundle-analyzer.","error":"Error: Cannot find module 'webpack-bundle-analyzer'"},{"fix":"Use exact string: 'gatsby-plugin-webpack-bundle-analyser-v2'","cause":"Plugin name misspelled or wrong format in gatsby-config.js.","error":"Error: The plugin \"gatsby-plugin-webpack-bundle-analyser-v2\" is not a valid plugin."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/JimmyBeldone/gatsby-plugin-webpack-bundle-analyser-v2","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/gatsby-plugin-webpack-bundle-analyser-v2","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}