Skip to content

Comments

feat: throw specified error to indicate undefined factory case in HMR#11584

Merged
stormslowly merged 2 commits intomainfrom
feat/throw_undefined_factory_error
Sep 10, 2025
Merged

feat: throw specified error to indicate undefined factory case in HMR#11584
stormslowly merged 2 commits intomainfrom
feat/throw_undefined_factory_error

Conversation

@stormslowly
Copy link
Contributor

@stormslowly stormslowly commented Sep 4, 2025

Summary

For #11324 (comment)

while HMR's enabled, when factory's not defined during apply hot update change,
throw a specified error to indicate this case then @rspack/react-refresh-plugin can handle this properly.

Related links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack. labels Sep 4, 2025
@netlify
Copy link

netlify bot commented Sep 4, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 4b03fdd
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68ba881351f787000885292b

@github-actions
Copy link
Contributor

github-actions bot commented Sep 4, 2025

📦 Binary Size-limit

Comparing 4b03fdd to perf: improve deterministic chunk ids (#11575) by harpsealjs

❌ Size increased by 128bytes from 47.24MB to 47.24MB (⬆️0.00%)

@codspeed-hq
Copy link

codspeed-hq bot commented Sep 4, 2025

CodSpeed Performance Report

Merging #11584 will not alter performance

Comparing feat/throw_undefined_factory_error (4b03fdd) with main (15ba68e)

Summary

✅ 17 untouched benchmarks

@stormslowly stormslowly marked this pull request as ready for review September 5, 2025 06:49
Copilot AI review requested due to automatic review settings September 5, 2025 06:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances error handling in the Hot Module Replacement (HMR) functionality by throwing a specific error when a factory is undefined during hot update application. This change enables the @rspack/react-refresh-plugin to properly handle undefined factory cases.

  • Adds a specific RuntimeError when factory is undefined during HMR hot update execution
  • Improves error messaging by throwing an error instead of just logging to console

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@stormslowly stormslowly enabled auto-merge (squash) September 10, 2025 09:20
@stormslowly stormslowly merged commit 6aef3a3 into main Sep 10, 2025
91 of 96 checks passed
@stormslowly stormslowly deleted the feat/throw_undefined_factory_error branch September 10, 2025 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: feature release: feature related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants