feat (webpack-image-sizes-plugin): adds option to silence console output#461
Merged
firestar300 merged 1 commit intomasterfrom Jun 3, 2025
Merged
feat (webpack-image-sizes-plugin): adds option to silence console output#461firestar300 merged 1 commit intomasterfrom
firestar300 merged 1 commit intomasterfrom
Conversation
Allows users to suppress console output from the plugin. This adds a `silence` option to the plugin configuration, which, when set to `true`, will prevent most console logs from being printed. This can be useful in environments where excessive logging is undesirable.
Reviewer's GuideAdds a new Sequence Diagram for Conditional Logging LogicsequenceDiagram
participant Caller
participant Plugin as WebpackImageSizesPlugin
participant Console
Caller->>Plugin: invokes method (e.g., apply())
Plugin->>Plugin: log("info", "Log message")
alt this.options.silence == false
Plugin->>Console: console.info("Log message")
else this.options.silence == true
%% No action for console output
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey @firestar300 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allows users to suppress console output from the plugin.
This adds a
silenceoption to the plugin configuration, which, when set totrue, will prevent most console logs from being printed. This can be useful in environments where excessive logging is undesirable.Summary by Sourcery
Add a
silenceconfiguration flag to WebpackImageSizesPlugin to globally suppress console logs, implement a conditional logging wrapper, and update the default plugin setup to use this option.New Features:
silenceoption to WebpackImageSizesPlugin to suppress console output when enabledEnhancements:
logmethod and replace all direct console calls to respect thesilenceflagDocumentation:
silenceoptionChores:
silence: trueby default in plugin instantiation within config/plugins.js