Do you want to request a feature or report a bug?
bug
What is the current behavior?
If I change something (component content for example) in my code, I have to do a manual page reload, seems like HMR has stopped working or something
If the current behavior is a bug, please provide the steps to reproduce.
Try to change something and see if it refreshes in the browser automatically
What is the expected behavior?
The changes are reflected immediately
Please mention other relevant information.
Hey,
I've spun up a fresh 2.0 app with the default template. HMR very much works.
Do you have a preact.config.js? Something there might be affecting the setup.
@lukeed I don't. I've used it out of the box, and suddenly - after I updated to v2.0.0, it's stopped working.
I'd wipe everything. Remove node_modules and any lock files, then reinstall.
@lukeed done that. Nothing.
@lukeed possibly related? Hot Reloading broke - webpack v3 · Issue #949 · webpack/webpack-dev-server
Update: I was testing a 1.4.1 app, 🤦♂️
Webpack 3.x is indeed not allowing HMR. I've tested removal of ModuleConcatenationPlugin and it had no effect, which I expected, since we're only using it in production builds.
I just checked with v2.0.0 on a new machine. It works totally fine for me. All the changes what I make in the code are being reflected in the browser as usual.
@reznord are you sure you're working with 2.0.0? Check your package.json
Ah, bummer! My bad. So, HRM does fail in latest version. 😞
@developit Anything we can do about that?
removing ModuleConcatenationPlugin from webpack.base.config doesn't solve it. Changing the version to 1.4.1 it works.
@rchaubey yep - exactly what @lukeed tried
@rchaubey changing to 1.4.1 works because we are on webpack 2.x in v1.4.1 in which the HMR works without any problem.
Let's hope @developit will jump in ASAP
I was talking to Sean about the same and he said similar issue was reported in vue-cli as well for the same HMR.
The issue is in the html-webpack-plugin. Once it is fixed in the upstream, probably a minor release with version upgrade for CLI should be good.
Edit: (sorry for the noise, pressed the wrong button - reopened the issue)
webpack-dev-server, thanks @zouhir
Most helpful comment
I was talking to Sean about the same and he said similar issue was reported in vue-cli as well for the same HMR.
The issue is in the html-webpack-plugin. Once it is fixed in the upstream, probably a minor release with version upgrade for CLI should be good.
Edit: (sorry for the noise, pressed the wrong button - reopened the issue)