reactql icon indicating copy to clipboard operation
reactql copied to clipboard

Hot Reload seems to be broken in master

Open chrischen opened this issue 6 years ago • 1 comments

I just cloned master, and ran it on node 12.2.0.

Hot reloading doesn't give any errors

image

However the component doesn't actually re-render.

Reloading the page loads the new changes.

chrischen avatar May 25 '19 08:05 chrischen

The last working revision was 31a95bf and on a6abe69 HMR stopped working.

My system is macOS Mojave and tested with Chrome and Safari.

After further debugging it seems

  1. I can get dynamic import()'d modules to hot reload by wrapping the export of the function component in hot().
  2. example/index.tsx cannot hot reload no matter if I wrap it in hot() or not. a) if example/index.tsx is imported in root.tsx without using the "@/.." alias and with a relative path, the page is at least reloaded to reflect changes to index.tsx.
  3. modules imported (static imports) and mounted as a child in example/index.tsx hot reloads without needing to wrap the export in hot().

chrischen avatar May 30 '19 09:05 chrischen