electron-userland / electron-userland/electron-webpack

React Hot Loader v4 workflow doesn't work

Open
#117 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
902
Forks
168
PR merge metrics
No merged PRs in 30d

Description

Using electron-webpack 1.13.0

See: https://github.com/gaearon/react-hot-loader#migrating-from-v3

When trying to use that workflow, I get:
```
[HMR] Cannot apply update. Need to do a full reload!
[HMR] Error: Aborted because ./src/renderer/Branch2.js is not accepted
Update propagation: ./src/renderer/Branch2.js -> ./src/renderer/App.js -> ./src/renderer/index.js -> 0
at hotApply (http://localhost:9080/renderer.js:442:30)
```

Even though I obviously have this in App.js:
```
import {hot} from 'react-hot-loader'

// ...

export default hot(module)(App);
```

~~It should probably be noted that v4 appears to be backwards-compatible, the v3 workflow (which is discussed here: https://github.com/electron-userland/electron-webpack/issues/59 ) still works.~~
(navono is right - state isn't preserved, so RHL actually doesn't work, even with v3 workflow: https://github.com/electron-userland/electron-webpack/issues/59#issuecomment-359372935 )

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.