You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This would make webpack-bundle-analyzer only compatible with webpack v4.39.0 and forwards. Right now we're compatible with even webpack v3 if I remember correctly, so this would be a major version bump.
Hey! I'd like to take a shot at this one. Before writing code, wanted to check in on a couple of things that touch public API behavior.
Plan: swap the custom Logger for webpack's built-in logger (compiler.getInfrastructureLogger(name)) across BundleAnalyzerPlugin.js and viewer.js. Bonus: this gives us time()/timeEnd() for free, which should help close #499 too.
Two questions:
logLevel option — right now it's plugin-local and filters our custom logger. Webpack's built-in logger doesn't have a per-plugin level; it's global via infrastructureLogging.level. I can either wrap the built-in logger to preserve logLevel exactly as-is, or drop our filtering and document that verbosity now follows the user's infrastructureLogging config (more webpack-native, but breaking). Which way would you want to go?
CLI mode — src/bin/analyzer.js has no live compiler (it reads a static stats.json), so it can't use the built-in logger. The custom Logger class would stay for CLI only; this migration is plugin-mode only.
Let me know if this tracks, happy to open a PR once I've got a steer on logLevel.
Is there a middle ground where we would be able to have backwards-compatible change for one release and then we can later drop the compat support and bump the major version?
Activity
valscion commentedon Jun 10, 2020
This would make
webpack-bundle-analyzeronly compatible with webpack v4.39.0 and forwards. Right now we're compatible with even webpack v3 if I remember correctly, so this would be a major version bump.alexander-akait commentedon Jun 10, 2020
We can't avoid breaking change using:
valscion commentedon Jun 10, 2020
Ah cool idea! That would be a possible idea.
jamesgeorge007 commentedon Jun 17, 2020
I would love to give it a shot 🙌
ronakmaheshwari commentedon Aug 16, 2026
Hey! I'd like to take a shot at this one. Before writing code, wanted to check in on a couple of things that touch public API behavior.
Plan: swap the custom
Loggerfor webpack's built-in logger (compiler.getInfrastructureLogger(name)) acrossBundleAnalyzerPlugin.jsandviewer.js. Bonus: this gives ustime()/timeEnd()for free, which should help close #499 too.Two questions:
logLeveloption — right now it's plugin-local and filters our custom logger. Webpack's built-in logger doesn't have a per-plugin level; it's global viainfrastructureLogging.level. I can either wrap the built-in logger to preservelogLevelexactly as-is, or drop our filtering and document that verbosity now follows the user'sinfrastructureLoggingconfig (more webpack-native, but breaking). Which way would you want to go?CLI mode —
src/bin/analyzer.jshas no livecompiler(it reads a staticstats.json), so it can't use the built-in logger. The customLoggerclass would stay for CLI only; this migration is plugin-mode only.Let me know if this tracks, happy to open a PR once I've got a steer on
logLevel.@valscion @alexander-akait
evenstensberg commentedon Aug 16, 2026
Sure open a pr, should be trivial. Import the logger and remove old logging
valscion commentedon Aug 17, 2026
Is there a middle ground where we would be able to have backwards-compatible change for one release and then we can later drop the compat support and bump the major version?
ronakmaheshwari commentedon Sep 10, 2026
@valscion @evenstensberg i have made the changes can you review and provide me with a feedback?
valscion commentedon Sep 29, 2026
I'll close this issue as #738 basically has resolved this one now.