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

module.hot.dispose event not being called #11

Open
birkir opened this issue Jun 6, 2019 · 2 comments
Open

module.hot.dispose event not being called #11

birkir opened this issue Jun 6, 2019 · 2 comments

Comments

@birkir
Copy link

birkir commented Jun 6, 2019

I have an issue with Next.JS + css modules.

Somehow, with css modules, the module.hot.dispose callback is not being fired. I am fixing this manually by adding the following snippet to the _app.js:

if (module.hot) {
  module.hot.addStatusHandler(status => {
    if (typeof window !== "undefined" && status === "ready") {
      window.__webpack_reload_css__ = true;
    }
  });
}

Any ideas why?

@sheerun
Copy link
Owner

sheerun commented Mar 5, 2020

I don't see any demo using extracted-loader at next.js. Maybe you can provide repository that reproduces this issue? Then maybe I could fix it

@gaurav5430
Copy link

where are you adding this snippet?

in the render method?

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

No branches or pull requests

3 participants