-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(hot-module-replacement): Fix and improve HMR management API #1562
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
Conversation
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.
Noticed some minor things, aside from that this looks good.
"unaccepted" | "accepted" | | ||
"disposed" | "accept-errored" | | ||
"self-accept-errored" | "self-accept-error-handler-errored", | ||
moduleId: 4, // The module in questions. |
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.
s/questions/question
- `onDisposed` (function(info)): Notifier for disposed modules | ||
- `onErrored` (function(info)): Notifier for errors | ||
|
||
The `info` object has this format: |
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.
Might rephrase as:
The
info
parameter will be an object containing the following values:
5: [4] | ||
}, | ||
error: new Error(...), // For errors: the thrown error | ||
orginalError: new Error(...) // For self-accept-error-handler-errored: |
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.
Is this supposed to be originalError
?
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.
Theoretically yes, but the typo is also in the source code. I try to fix it in the source.
Ah ok, want me to hold off on merging until you release a patch? |
In webpack 2
check
andapply
return Promises.There are more options.