Registry / web-framework / gatsby-plugin-webpack-bundle-analyser-v2

gatsby-plugin-webpack-bundle-analyser-v2

JSON →
library1.1.32jsnpmunverified

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.

npm install gatsby-plugin-webpack-bundle-analyser-v2
INSTALL
IMPORT
SIG · GATSBY-PLUGIN-WEBP
G
gatsby-plugin-webpack-bundle-analyser-v2
web-frameworkjavascriptv1.1.32
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plugin Configuration
module.exports = { plugins: [{ resolve: 'gatsby-plugin-webpack-bundle-analyser-v2', options: { analyzerMode: 'server' } }] }
module.exports = { plugins: ['gatsby-plugin-webpack-bundle-analyser-v2'] }
String shorthand works for defaults; object form needed for custom options.
Use in gatsby-config.js with options
module.exports = { plugins: [ { resolve: 'gatsby-plugin-webpack-bundle-analyser-v2', options: { devMode: true } } ] }
const plugin = require('gatsby-plugin-webpack-bundle-analyser-v2'); module.exports = { plugins: [plugin] }
Plugin is configured via gatsby-config.js, not imported and instantiated directly.
Dev mode activation
options: { devMode: true }
options: { devMode: 'true' }
devMode expects boolean, not string.

Configures the plugin with custom analyzer options and runs a build to open the bundle analysis in a browser.

// gatsby-config.js module.exports = { plugins: [ { resolve: 'gatsby-plugin-webpack-bundle-analyser-v2', options: { analyzerMode: 'server', analyzerPort: 3001, defaultSizes: 'gzip', }, }, ], }; // Run build: gatsby build // Browser opens automatically with bundle analysis.
Debug
Known issues
gotchaPlugin is disabled in development mode by default. Builds will not open analyzer unless devMode: true is set.
fix
Add options: { devMode: true } to plugin configuration in gatsby-config.js.
affects: >=1.0.0
gotchaThe plugin uses webpack-bundle-analyzer v4+, which may break if Gatsby's webpack version is incompatible.
fix
Ensure Gatsby version satisfies peer dependency (^4.0.0 || ^5.0.0). If issues arise, pin plugin version to 1.1.25.
affects: >=1.1.26
deprecatedgatsby-plugin-webpack-bundle-analyser-v2 may be less actively maintained; check for updates or consider alternatives like gatsby-plugin-webpack-bundle-analyzer.
fix
Use gatsby-plugin-webpack-bundle-analyzer if you need more active maintenance.
affects: >=1.1.32
Errors
Common errors & fixes
Error: Cannot find module 'webpack-bundle-analyzer'
Missing dependency of webpack-bundle-analyzer.
fix
Run npm install webpack-bundle-analyzer --save-dev
Error: The plugin "gatsby-plugin-webpack-bundle-analyser-v2" is not a valid plugin.
Plugin name misspelled or wrong format in gatsby-config.js.
fix
Use exact string: 'gatsby-plugin-webpack-bundle-analyser-v2'
Upgrade
Version history
1.1.32latest on npm
Audit
Dependencies
gatsbyrequiredPeer dependency; plugin extends Gatsby's webpack config.
webpack-bundle-analyzerrequiredCore dependency; provides the bundle analysis functionality.
Agent activity
2 hits · last 30 days
node
2
Resources
gatsby-plugin-webpack-bundle-analyser-v2 — npm install gatsby-plugin-webpack-bundle-analyser-v2 · libregistry