Skip to content

feat: Migrate to Webpack Built-in Infrastructure Logger with Backward… - #738

Open
ronakmaheshwari wants to merge 1 commit into
webpack:mainfrom
ronakmaheshwari:main
Open

feat: Migrate to Webpack Built-in Infrastructure Logger with Backward…#738
ronakmaheshwari wants to merge 1 commit into
webpack:mainfrom
ronakmaheshwari:main

Conversation

@ronakmaheshwari

Copy link
Copy Markdown

This pull request updates the logging system of the webpack-bundle-analyzer plugin to integrate with Webpack's native infrastructure logger when available. It introduces a new adapter for compatibility, deprecates the plugin's logLevel option in favor of Webpack's infrastructureLogging, and updates documentation and type annotations accordingly.

Logging integration and deprecation:

  • The plugin now uses Webpack's infrastructure logger via compiler.getInfrastructureLogger('webpack-bundle-analyzer') when available, providing better integration with Webpack's logging system.
  • The logLevel option is deprecated in favor of Webpack's infrastructureLogging.level, with documentation and type comments updated to reflect this change. A deprecation warning is shown if logLevel is used. [1] [2] [3] [4] [5]

Logger implementation and type updates:

  • Introduces InfrastructureLoggerAdapter in Logger.js to bridge between the plugin's logger interface and Webpack's infrastructure logger, supporting log level filtering and deprecation warnings. [1] [2] [3]
  • Updates type annotations throughout the codebase (src/analyzer.js, src/utils.js, src/viewer.js) to accept either the custom Logger or Webpack's infrastructure logger for improved type safety and compatibility. [1] [2] [3] [4] [5] [6] [7]

These changes ensure that logging is consistent with Webpack's ecosystem and prepare for the eventual removal of the plugin's custom logLevel option compatibility

#358

@valscion if you can review it

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ad3efed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
webpack-bundle-analyzer Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 10, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: ronakmaheshwari / name: ronak maheshwari (ad3efed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant