alexmingoia / pux-starter-app

Starter Pux app w/ hot-reloading and isomorphic routing and rendering
https://www.purescript-pux.org
BSD 3-Clause "New" or "Revised" License
101 stars 39 forks source link

Hot reloading doesn't work #25

Closed ianthehenry closed 7 years ago

ianthehenry commented 8 years ago

On a clean clone of the pux-starter-app, after running npm install, the following error occurs when making changes to source files. The hot module replacement sees this error and triggers a full page refresh, but you can see the error if you set "Preserve log" in the Chrome dev console.

Error: EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.

This prevents hot reloading from ever working, as the HMR runtime will always do a full page refresh, blowing out all your state.

sleexyz commented 8 years ago

Issue fixed by upgrading the following packages to the following versions:

    "webpack": "^2.1.0-beta.25",
    "webpack-dev-middleware": "^1.8.3",
    "webpack-hot-middleware": "^2.12.2"

I'll create a PR