Skip to content

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

Merged
merged 3 commits into from
Sep 2, 2017

Conversation

sokra
Copy link
Member

@sokra sokra commented Aug 31, 2017

In webpack 2 check and apply return Promises.

There are more options.

Copy link
Collaborator

@skipjack skipjack left a 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.
Copy link
Collaborator

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:
Copy link
Collaborator

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:
Copy link
Collaborator

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?

Copy link
Member Author

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.

@skipjack
Copy link
Collaborator

skipjack commented Sep 1, 2017

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?

@skipjack skipjack merged commit 2b45bbf into master Sep 2, 2017
@skipjack skipjack deleted the content/hmr-api branch September 2, 2017 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants