extracted-loader icon indicating copy to clipboard operation
extracted-loader copied to clipboard

module.hot.dispose event not being called

Open birkir opened this issue 6 years ago • 2 comments

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?

birkir avatar Jun 06 '19 15:06 birkir

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

sheerun avatar Mar 05 '20 09:03 sheerun

where are you adding this snippet?

in the render method?

gaurav5430 avatar Mar 23 '20 13:03 gaurav5430