Webpacker: Disable HMR in Dev?

Created on 20 May 2017  路  6Comments  路  Source: rails/webpacker

The app I'm writing really doesn't work well with HMR in develop. I need to disable it, but setting

~javascript
{
devServer: {
hot:false
}
}
~

In webpack/development.js or webpack/development.server.js has no effect. HMR is still running. There are no other instances of the word 'hot' in config/webpack ... what to do?

Most helpful comment

@gauravtiwari took a while to respond. For posterity:

I'd thought HMR & live reloading were essentially the same thing. I wanted both off.

Looks like webpack 2 supports turning off live reload with " --no-inline" is that right? And, is it supported in 3?

All 6 comments

You mean live reloading on change? HMR isn't enabled by default.

Seems to be enabled by default when running webpack-dev-server. Anytime I mod a js file I get reloads on the client.

remote: https://github.com/rails/webpacker.git
revision: f8dcb30b2bb0ac3ee0cadc753c754c37ba06d592

I've routed around it by using "webpack --watch"

@relativityboy Yepp that's live reloading which is enabled by default in dev server. Yes, you can use watcher in case you don't want to use dev server at all 馃憤

How do you use webpack --watch. Running that command just like that does not work for me.

@gnapse ./bin/webpack --watch --progress --colors

@gauravtiwari took a while to respond. For posterity:

I'd thought HMR & live reloading were essentially the same thing. I wanted both off.

Looks like webpack 2 supports turning off live reload with " --no-inline" is that right? And, is it supported in 3?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ankitrg picture ankitrg  路  3Comments

FrankFang picture FrankFang  路  3Comments

ijdickinson picture ijdickinson  路  3Comments

johan-smits picture johan-smits  路  3Comments

iChip picture iChip  路  3Comments