electron / electron/forge

HMR not working: electron forge does not allow user to overide devServer.static config

Open
#2,599 1 comment 1 reaction 0 assignees View on GitHub
plugin/webpack
Dominant language
TypeScript
Stars
7.1k
Forks
641
Avg merge
3d 1h
Merged PRs (30d)
30

Description

### Pre-flight checklist

- [X] I have read the [contribution documentation](https://github.com/electron-userland/electron-forge/blob/master/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [code of conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project uses.
- [X] I have searched the issue tracker for a bug that matches the one I want to file, without success.

### Electron Forge version

6.0.0-beta.61

### Electron version

15.1.1

### Operating system

macOS 11.6

### Last known working Electron Forge version

_No response_

### Expected behavior

allow user to overide devServer.static config

https://github.dev/electron-userland/electron-forge/blob/c05748519b8257f100e9e3dbf9903258baa85056/packages/plugin/webpack/src/WebpackPlugin.ts#L353-L374

Otherwise react HMR is not working. It will always reload the page if change detected.

### Actual behavior

React HMR is not compatible with electron forge. Because static file changed right after content is modified, and the `watch` config will cause the page refreshing.

### Steps to reproduce

as above

### Additional information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.