web-infra-dev / rsbuild

The Rspack-based build tool. It's fast, out-of-the-box and extensible.
https://rsbuild.dev/
MIT License
1.46k stars 116 forks source link

[Feature]: Support `handleHotUpdate` hook similar to Vite #3182

Open niksy opened 1 month ago

niksy commented 1 month ago

What problem does this feature solve?

Similar to Vite, Rsbuild could have easy HMR handling through some specific option. Maybe this is better implemented at lower level like Rspack and it’s exposed as option in Rsbuild.

This could also solve HMR implementation details in Unplugin scenarios such as Vue plugin HMR.

What does the proposed API look like?

Take a look at handleHotUpdate API for Vite. There are a few simple concepts that I think can be implemented in Rsbuild.

chenjiahan commented 1 month ago

Thanks, we will investigate this feature after releasing 1.0