fix(hmr): stop unloaded-route edits from wedging browser HMR

Merged
FA
2mo ago
+166-0

React Router queues manifest updates for lazy routes even when their modules aren't loaded in the browser. Its HMR runtime throws on those entries before clearing the queue, blocking every later hot update until a full page reload. Add a Vite plugin that patches the runtime to skip unloaded routes instead of throwing.

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

New Feature Submission:

  • Does your submission pass the tests?
  • Have you linted your code locally prior to submission?

Changes To Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?