web-infra-dev / rspack

The fast Rust-based web bundler with webpack-compatible API 🦀️
https://rspack.dev
MIT License
10.2k stars 578 forks source link

[Feature]: support build performance hint #7918

Open hardfist opened 2 months ago

hardfist commented 2 months ago

What problem does this feature solve?

It’s easy to inadvertently misuse Rspack, which can lead to performance issues. To address this, we can utilize webpack's performance hints to identify common problems and provide recommendations, such as:

What does the proposed API of configuration look like?

we can enable performance hints by default, but support disable it by configuration

export default {
  performance: {
     // true means turn on all build hints, true by default
     // false means turns off all build hints
     // ['^babel'] means turns off only babel related build hints
     build: true | false | ['^babel'] 
  }
}
stale[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. If this issue is still affecting you, please leave any comment (for example, "bump"). We are sorry that we haven't been able to prioritize it yet. If you have any new additional information, please include it with your comment!