fix: clean up previous runtime on Bun HMR reload by nounder · Pull Request #6047 · Effect-TS/effect
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When bun is --hot, Bun automatically updates server handles on subsequent runs so there's no port holding. My initial implementation waited for previous program to finalize but that caused intermissions in-between, similar to what happens when --watch is used.
Since --hot is explicit and opt-in, I think current behavior makes sense. I think even React hot reloading via react-fast-refresh is executing new tree and running cleanup after vdom compare.