webpack
webpack copied to clipboard
fix: stats.hasWarnings() should respect ignoreWarnings
Summary
Actually, I am not sure if this is a bug or if it was done intentionally. But I think hasWarnings in stats should respect ignoreWarnings。
Especially in the compiler.hooks.done hooks, stats obtained is directly processed via hasWarnings to handle warnings.
🤖 Generated by Copilot at 345939a
Refactor Stats.hasWarnings to use Compilation.getWarnings. This is part of a larger effort to optimize and enhance the stats output.
Details
stats.hasWarnings() should respect ignoreWarnings
🤖 Generated by Copilot at 345939a
- Refactor warnings handling logic in
Compilationclass (0,10,10,1,F0L3R
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: nanianlisao / name: chenxiang (2cf42837519387a9e35d87560862488d442ea83f, 345939a0b978d5e6c597d666c8aa73d20dea7306, 6f8340a59b19401d07efaf2bb2a7cfec060f2a0d)
For maintainers only:
- [ ] This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
- [ ] This needs to be backported to webpack 4 (issue will be created when merged)
@alexander-akait Hi, I've noticed that my pull request hasn't been reviewed yet. If you could find some time to review it, I'd really appreciate it.
Thanks a lot!
@alexander-akait Yeah, this could be a potential breaking change. I believe we should consider this change for webpack v6
I think this is valid, ignoreWarnings should be respected.
@vankop I think we need a test cases to prevent a regression in future
Feel free to send it and we can merge it
@nanianlisao Thanks for your update.
I labeled the Pull Request so reviewers will review it again.
@vankop Please review the new changes.
Great, could you please take a look again. @alexander-akait