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

fix: restore original hot reloading behaviour for locals #419

Merged
merged 1 commit into from
Aug 5, 2019

Conversation

alexander-akait
Copy link
Member

@alexander-akait alexander-akait commented Aug 5, 2019

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

fixes #320

Breaking Changes

Yes

Additional Info

/cc @lydell

Here right example:

if(module.hot.data) {
  if(!equal(module.hot.data.locals, locals)) {
    // Continue bubbling when we detect locals doesn't match
    module.hot.setUnhandled();
  }
}

module.hot.accept();
module.hot.dispose(data => {
  data.locals = locals;
});

but now we don't have module.hot.setUnhandled api, we will try implement this for webpack@5 (but we have many tasks), now i jest revert this PR, because it is break hot reloading in many cases (include hot-react-loader)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aborting CSS HMR due to changed css-modules locals when using react-hot-loader
1 participant