Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HMR not working when fixing errors #6694

Closed
lstkz opened this issue Mar 20, 2019 · 4 comments
Closed

HMR not working when fixing errors #6694

lstkz opened this issue Mar 20, 2019 · 4 comments
Labels

Comments

@lstkz
Copy link

lstkz commented Mar 20, 2019

Is this a bug report?

Yes.

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

HMR, hot-reloading

Environment

"react-scripts": "2.1.8"

Steps to Reproduce

  1. Enable HMR. Wrap the main render method with module.hot.accept(.
  2. Edit a component and add throw new Error('boo') somewhere.
  3. An error overlay should be visible.
  4. Remove the error statement.
  5. The page is hard-reloading instead of patching.

Expected Behavior

The page should not hard-reload.

Actual Behavior

The page is hard-reloading.
Here is the full video https://take.ms/DjMTV. You can see that console logs are disappearing, and it means hard-reload.
HMR works correctly if I update something without errors.

redbox-react works correctly, and it's possible to implement HMR on errors, but CRA uses a different library.

Reproducible Demo

Repo

@heyimalex
Copy link
Contributor

I'm asking because I honestly don't know: does CRA even claim to support hot module reloading? I'm not sure anyone wants to devote time to an issue for a feature that isn't officially supported.

@lstkz
Copy link
Author

lstkz commented Mar 26, 2019

There is already a PR for this #2304 and I missed it.
It's related to "Editing after compile error should still be hot".

@stale
Copy link

stale bot commented Apr 25, 2019

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Apr 25, 2019
@stale
Copy link

stale bot commented Apr 30, 2019

This issue has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue.

@stale stale bot closed this as completed Apr 30, 2019
@lock lock bot locked and limited conversation to collaborators May 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants