Spectrum is now read-only. Learn more about the decision in our official announcement.


Eclipse Theia - Cloud & Desktop IDE


How to auto refresh the page when code changed

March 21, 2020 at 3:39pm

How to auto refresh the page when code changed

March 21, 2020 at 3:39pm (Edited 3 years ago)
Like using the webpack-dev-server the hot reload mode. How can I get my browser auto-reload the page when changing my code? if I need to modify the webpack configuration file by my self?

March 21, 2020 at 5:03pm
Hot reloading happens by a side-channel, which uses a different port. So you need to expose the live-reload port on the docker run command, like this -p 35729:35729

March 22, 2020 at 1:43am
Hi... Thank you for your reply. I am trying to use the yeoman generator to create a theia extension. I find I need to start a backend express server before watch my extension. The static file packed by webpack will host on this server. Does it mean if I want to turn on hot-reload I should modify the server.js file and import the webpack-hot-middleware and add hot reloading into this existing server?

March 23, 2020 at 7:25am
We tried to use hot reload at the beginning but it was not very useful with Theia since most of content is dynamic and setup was not easy. Not sure whether it is possible to setup now.
There is webpack.config.js in your example app which can be modified to customize bundling, you can try to enable hot reload there.

July 22, 2020 at 7:48am
Hey, were you able to get it working?