Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Reload the page after webpack watch compile #3871
I'd occasionally find it useful to keep an outdated version of an editor tab active for comparison's sake, but not often enough that this would disrupt my typical workflow.
I do worry a bit since Webpack rebuilds can be very noisy that we could encounter annoyances around unexpected reloads.
Generally I'd be okay with something like this though.
I tried implementing webpack-dev-server but that I didn't crack that this time.
Can you elaborate on the issues you were encountering?
@aduth Because WordPress itself is served by a different web server you have to proxy every request. Once I had that in place I didn't get any further. Webpack dev server wouldn't show console messages that it is trying to reload and the page wouldn't reload at all. (I would also like to add that I have never manually set up a Webpack configuration, so I might not be the best person to take a crack at this. I have asked @Xyfi to take another look once he's back from vacation.
If you want we could implement a new Gutenberg specific constant like
This is ready for review.
Live reloading can now be enabled by setting the
I've also made it possible to customize the port that the livereloading server uses. This is useful when multiple projects support livereloading. This is used like so: