Skip to content

feat: rework HMR-client#1005

Merged
jbroma merged 24 commits intomainfrom
feat/rsbuild-like-hmr
Feb 20, 2025
Merged

feat: rework HMR-client#1005
jbroma merged 24 commits intomainfrom
feat/rsbuild-like-hmr

Conversation

@jbroma
Copy link
Copy Markdown
Contributor

@jbroma jbroma commented Feb 18, 2025

Summary

This PR introduces reworked HMR pipeline which closely resembles the implementation from Rsbuild. The reworked HMR implementation is faster, has better error recovery (even from compile errors like syntax errors) and when it fails, it fails more gracefully instead of spamming the terminal with useless logs.

Closes #999

  • - reworked WebpackHMRClient implementation
  • - extracted common functionality to WebsocketServer class
  • - added heartbeat to WebsocketServers for cleaning up dead connections
  • - WebsocketHMRServer now broadcasts to all HMR clients everytime and it's up to the client to act on the message or discard it
  • - fixed the stuck 'Downloading 100%'

Test plan

  • - tests pass
  • - testers work

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 18, 2025

🦋 Changeset detected

Latest commit: 458be3d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack-dev-server Major
@callstack/repack Major
@callstack/repack-plugin-expo-modules Major
@callstack/repack-plugin-nativewind Major
@callstack/repack-plugin-reanimated Major
@callstack/repack-init Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 18, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
repack-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 9:49am
repack-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2025 9:49am

@jbroma
Copy link
Copy Markdown
Contributor Author

jbroma commented Feb 19, 2025

Copy link
Copy Markdown
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea what I'm reading here 🙈

@jbroma
Copy link
Copy Markdown
Contributor Author

jbroma commented Feb 19, 2025

tested the canary in super-app-showcase, all green 🟢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using cache while HMR enabled causes infinite reloading

2 participants