lvarayut / relay-fullstack

:point_up::running: Modern Relay Starter Kit - Integrated with Relay, GraphQL, Express, ES6/ES7, JSX, Webpack, Babel, Material Design Lite, and PostCSS
https://lvarayut.github.io/relay-fullstack/
MIT License
986 stars 126 forks source link

React hot loader not working? #67

Closed rogersp closed 7 years ago

rogersp commented 7 years ago

Running into an issue where hot reload of React components is not working as expected. There is a HMR warning in the console which may be related:

image

Here are the steps I've performed, on a Win10x64 machine:

from:

nodemon --watch server/data/**/*.js --exec \"npm run update && ./node_modules/.bin/babel-node server/index.js\"

to:

nodemon --watch server/data/**/*.js --exec \"npm run update && babel-node server/index.js\"

Notice the elimination of ./node_modules/.bin/. This is a quick and dirty fix for Windows which doesn't like the local babel-node reference.

My expectation is the login page heading would change without a full-page refresh. Any idea why this is not working as expected?

Neitsch commented 7 years ago

I can confirm the error, but the fix does not work for me (please let us know which babel-cli/babel-node version you use). I'd speculate that react-hot-loader causes this, last updated in #62. However, before the PR, the error message was

The following modules couldn't be hot updated: (They would need a full reload!)

@ncrmro might be more familiar with HMR

ncrmro commented 7 years ago

@rogersp @Neitsch can confirm master and canary branches HMR isn't being triggered atm. Checking it out.

ncrmro commented 7 years ago

Actually that was cause I had two webpack dev servers except custom ports were sending one's request to the other.

HMR is working with the latest canary branch. I've just checked.

I'm working on OS X. Haven't done much dev on windows.

rogersp commented 7 years ago

@Neitsch @ncrmro can confirm HMR does work for react components in canary branch on Windows.

ncrmro commented 7 years ago

@rogersp great going to close for now!