Skip to content

fix(browser): disable rsbuild hmr outside watch mode#1010

Merged
fi3ework merged 1 commit intomainfrom
fix/browser-hmr-non-watch
Mar 5, 2026
Merged

fix(browser): disable rsbuild hmr outside watch mode#1010
fi3ework merged 1 commit intomainfrom
fix/browser-hmr-non-watch

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Mar 5, 2026

Summary

  • Disable browser-mode Rsbuild dev.hmr when not in watch mode by wiring hmr to isWatchMode in createBrowserRuntime.
  • Keep watch mode behavior unchanged (hmr: true) while avoiding unnecessary HMR/full-reload paths during one-shot rstest run.
  • Add regression coverage in packages/browser/tests/hostController.test.ts for both non-watch and watch dev config outcomes.

Testing

  • pnpm rstest 'packages/browser/tests/hostController.test.ts'
  • pnpm --filter @rstest/browser typecheck

@fi3ework fi3ework enabled auto-merge (squash) March 5, 2026 07:35
@fi3ework fi3ework merged commit 533003b into main Mar 5, 2026
22 of 26 checks passed
@fi3ework fi3ework deleted the fix/browser-hmr-non-watch branch March 5, 2026 08:32
@9aoy 9aoy mentioned this pull request Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant