Hot reloading is disabled after put webpack-externals in webpack.config.js

77 views Asked by At

I'm using webpack in my electron + reactjs app.

It was very slow in dev so I did put externals: [nodeExternals()]

and now the speed of dev is OK but electron does not refresh the page after hot reloading. I mean hot reloading is working but the screen doesn't refresh after it.

1

There are 1 answers

1
Akshay Mulgavkar On

This usually happens sometimes. You have to make use of the shake gesture to refresh sometimes.

Also, you can keep the enable hot reloading on so that it shows the live reloading when you save the code.

To enable live reloading

  1. react-native run-android to run the app.
  2. Then click on emulator and press CTRL + M (CMD + M on MacOS) or shake the Android device which has the running app.
  3. Then select the Enable Live Reload option from the popup

Note: For some Mac system cmd + m doesn't work, Yan can run adb shell input keyevent 82

Hope this helps

You're good to go!!