web-infra-dev / rspack

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

[Feature]: How to get real-time compilation progress and send it to the client? #7728

Closed nuintun closed 3 days ago

nuintun commented 2 weeks ago

What problem does this feature solve?

https://rspack.dev/zh/plugins/webpack/internal-plugins#progressplugin

The documentation mentions it, but the function does not take effect when passed in! There is an option to enable progress in webpack-dev-server:

https://github.com/webpack/webpack-dev-server/blob/530db07435fd5c826aa105b2825324e10f2aea18/lib/Server.js#L1686

What does the proposed API of configuration look like?

Refer to the functional API of webpack.

https://github.com/webpack/webpack-dev-server/blob/530db07435fd5c826aa105b2825324e10f2aea18/lib/Server.js#L1686

CPunisher commented 1 week ago

Passing real-time compilation progress from rust side to js seriously regresses the performance. I think this feature will not be implemented before a efficient way is found.