[Feature]: Additional hooks for HotModuleReplacementPlugin
#9409
Labels
pending triage
The issue/PR is currently untouched.
HotModuleReplacementPlugin
#9409
What problem does this feature solve?
Currently there are some weird open issues regarding using Vue and HMR:
vue-loader seems like it’s in a low priority maintenance mode and there aren’t any signals or activity from core maintainers on long standing issues. Everything seems focused on Vite support and it’s a shame that crucial element for Vue usage in Rspack/Rsbuild is left to unmaintained dependancy.
If Rspack and Rsbuild can use Vite implementation as opposed to unmaintained vue-loader implementation, a lot of the weird issues and bugs could be fixed. If Unplugin version is used, only HMR support is current blocker AFAIK.
If this component can be switched to unplugin-vue, I think Rspack/Rsbuild could benefit from that, and this will also affect other parts such as Nuxt, greater adoption rate, etc.
@9aoy mentioned that for Unplugin/Vite version to be used as default there would need to be some hooks inside HMR plugin so it can reuse that implementation.
What does the proposed API of configuration look like?
Something that works similar to
handleHotUpdate
in Vite. This could also increase adoption of other Vite or Unplugin specific plugins which have HMR support integrated.The text was updated successfully, but these errors were encountered: