umijs / mako

An extremely fast, production-grade web bundler based on Rust.
https://makojs.dev
MIT License
1.79k stars 65 forks source link

feat: hmr channel supports action msg #1155

Closed PeachScript closed 2 months ago

PeachScript commented 4 months ago

在 RSC 场景对 HMR 有两个新增需求:

  1. HMR runtime 支持 action 消息,允许 server 端主动触发客户端刷新,用于在 RSC server 产物更新时实现 Hot Reload,未来会再想方案支持 RSC server 组件的 HMR(直接做 HMR 不做 reload 了)
  2. 对于 async chunk 加载的模块,不能标记为 _main,因为 client 组件会通过 async chunk 加载,被标记为 _main 会出现 HMR 成功仍然 Hot Reload 的现象
xusd320 commented 4 months ago

REF: https://github.com/umijs/mako/issues/1133

sorrycc commented 2 months ago

https://github.com/umijs/mako/pull/1369 里修复了。