Webpack-hot-middleware: HMR Connected but not picking up changes

Created on 31 Oct 2016  路  3Comments  路  Source: webpack-contrib/webpack-hot-middleware

Hi,

I have setup an application which uses your middleware but have run into an issue where my code wont hot reload.

In the browser console it states the [HMR] is connected but doesn't detect any changes?

I am fairly new to this so if I may have missed something.

I have this running on a vagrant server not sure if that would pose an issue?

the application is here if you wouldn't mind taking a look 馃憤

Most helpful comment

I figured it out in the end I needed to add this to the webpack-dev-middleware options

watchOptions: {
        aggregateTimeout: 300,
        poll: true
}

Thanks a lot for the help!

All 3 comments

Nothing looks obviously wrong.

What does the output look like in the console where the server is running?

If it's via vagrant there's a chance that you're not getting filesystem change events, and you'll need to configure webpack-dev-middleware to use the fallback polling mechanism for changes. I don't know how/if this can be done - you'll have to check their docs.

I figured it out in the end I needed to add this to the webpack-dev-middleware options

watchOptions: {
        aggregateTimeout: 300,
        poll: true
}

Thanks a lot for the help!

Personally HMR is picking up changes (I install notify-tools on my debian container) BUT the HMR client fails to connect (#374) @moshie how did you make websocket connection works (once again detecting file changes works fine) ?

Was this page helpful?
0 / 5 - 0 ratings