Skip to content

fix: restore original hot reloading behaviour for locals#419

Merged
alexander-akait merged 1 commit intomasterfrom
issue-320
Aug 5, 2019
Merged

fix: restore original hot reloading behaviour for locals#419
alexander-akait merged 1 commit intomasterfrom
issue-320

Conversation

@alexander-akait
Copy link
Copy Markdown
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