-
Notifications
You must be signed in to change notification settings - Fork 295
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
Show error overlay even after browser refresh #132
Conversation
1 similar comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems sensible to me. Are there any potential problems do you think with having the other bits of the hot reloading code run?
@glenjamin I think it's actually desirable to have the rest of the hot reloading code run because as soon as you fix the error it'll just continue as if you hadn't ever refreshed. I'll tidy it up and try to ensure I cover any potential edge cases. |
1 similar comment
@glenjamin I've tidied it up with the following improvements:
Let me know your thoughts. |
sinon.assert.calledOnce(processUpdate); | ||
it("should trigger webpack on successful builds / syncs", function() { | ||
const actions = ['built', 'sync']; | ||
actions.forEach(function(action) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this loop outside the it()
, or manually repeat the test so that it's two distinct cases?
@glenjamin 👍 let me know when you next publish |
Released as |
* Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh
* Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh * fixup! Show error overlay even after browser refresh
Currently, if you refresh the client whilst the compilation is in an error state you don't get any feedback (and if using the NoErrorsPlugin you actually get a working app; albeit using the last working bundle) -- you need to check the terminal window to be sure this hasn't happened.
This PR aims to solve the problem by publishing the 'built' event based on the last known compilation stats as soon as a client is registered with the middleware meaning the client script will show the overlay if appropriate.