Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module.hot is always true #129

Closed
KaseyPowers opened this issue Jan 2, 2018 · 4 comments
Closed

module.hot is always true #129

KaseyPowers opened this issue Jan 2, 2018 · 4 comments

Comments

@KaseyPowers
Copy link

the plugin is always added currently, so even if hot reloading is turned off in the config, this statement will be true

@robmcguinness
Copy link
Contributor

Possible solution: https://github.com/NoamELB/react-hot-loader-loader

@robmcguinness robmcguinness added this to the v4 milestone Feb 19, 2018
@robmcguinness
Copy link
Contributor

@TheSharpieOne
Copy link
Collaborator

How are you turning it off?
I see this in the docs which references development.hot:

    development: {
        notification: true
        hot: true
    },

but that property is not used AFAICT. development.hotLoader is used for the webpack config via settings call:

isHotLoader() {
return get(this.configuration, 'development.hotLoader', true);
},

hot is used by webpack dev server, but to set that you need development.webpackDevServer.hot to override the default of true

I am not sure if these values should always be the same, but it seems like it. (so that webpack dev server only hot when the webpack hot plugins and loaders are enabled, and the webpack hot plugin and loaders are only enabled when the webpack dev server is hot)
I tried it out locally, it "worked" it was no longer hot... but then I ran into webpack/webpack-dev-server#1251 which means without hot, it will fallback to "live reloading" and now every change reloads the page... which was not so great.

@robmcguinness robmcguinness removed this from the v4 milestone May 31, 2019
@GoPro16
Copy link
Contributor

GoPro16 commented Mar 5, 2020

The new react-refresh babel loader is able to track hot reloads without having to modify the app code. Unless there is some dire need to make a change cause a full page refresh I don't see why this would be needed IIRC. I don't think CRA supports causing a full page refresh out of the box on code update.

@GoPro16 GoPro16 closed this as completed Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants