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
Don't enable HMR by default #1251
Comments
I am also experiencing this issue, using |
We'll happily review a PR to resolve this issue. |
Hey @shellscape, I'd like to work on this PR if no one has started yet. |
I guess I fixed it in #1276. @happypoulp, @benstaker can you check if the fix worked for you? |
@byzyk works perfectly, thanks! |
Hot Module Replacement (HMR) — is a hot reloading of modules (js/css/files). Reloading a full browser page is not HMR, it is a separate feature (sometimes called "live reload": when the source file changes the browser page is fully reloaded to apply these changes). So there is HMR and there is "live reload". When source files are changed — these changes are expected to be delivered to the browser in one way or another (HMR or "live reload"). So |
@andreyvolokitin I agree, a |
Please test the latest beta, |
Same here for To disable all "live updates"
"Live updates" mode
HMR mode
const renderApp = () => {
const App = require('./App').App;
render(
<App />,
document.getElementById('root'),
);
};
if (module.hot) {
module.hot.accept('./modules/core/App', () => {
console.log('=== Hot reloading the app...');
renderApp();
});
}
renderApp();
Watch mode
|
I have the same issue. I solved this problem with "NODE_ENV=production nuxt build" |
/cc @kellyrmilligan @sepo27 sorry for delay, problem still exists? |
Disabling live reload I had real hard time finding |
Found kludge workaround: setting |
Like @cben , watchOptions: {
// used to prevent file watching and rebundling during the CI process.
ignored: process.env.NODE_ENV === 'ci' ? ['*'] : undefined
} Our CI process initializes with |
Code
# command used to run webpack dev server ./node_modules/.bin/webpack-dev-server --config webpack.config.js --progress --colors
Expected Behavior
When no options to activate HMR is provided, HMR should NOT be enabled. When modifying a source file watched by webpack, webpack-dev-server should not try to hot reload a module and it should not reload the full page either.
Actual Behavior
Even though I did not provided --hot (or --hot --inline) on the command line used to run webpack-dev-server and even though my devServer config does not contain hot: true or false, or hotOnly: true or false, when modifying a source file watched by webpack, it reloads the full page. Note that trying to provide hot: false, hotOnly: false to the devServer config does not disable HMR either.
For Bugs; How can we reproduce the behavior?
To reproduce the issue, clone this repo:
https://github.com/happypoulp/webpack3-issue/
, go to branchissue-hmr-disable
, build and start app and you will see the issue when changing and savingsrc/index.js
.For Features; What is the motivation and/or use-case for the feature?
The text was updated successfully, but these errors were encountered: