-
Notifications
You must be signed in to change notification settings - Fork 298
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
Force page reload when reload needed. #180
Comments
Add |
Hey @glenjamin I do have that and still seem to be running into this, out of curiosity could it be to do with electron? |
Hey @glenjamin actually scratch that I was passing const settings = middleware(compiler, {
publicPath: dev.output.publicPath,
path: `http://${config.host}:${config.port}/__webpack_hmr`,
reload: true,
quiet: true
}); But when I added it like this: base.entry.unshift(
// hot-middleware allows us to still have HMR even when connected to the electron server
`webpack-hot-middleware/client?reload=true`
); It worked, any reason why this would be? And if so would it be possible to add to add it via the options objects I try to avoid the query string URL format. |
The first one is adding config to the server, the second one is adding config to the client. Reloading is a client setting, so has to be done on the client. If there's another way to pass config to client bundles like that i'm not aware of it - you'd have to ask around in webpack support. |
I currently have a situation where I would like to disable HMR and just do a page reload when a file is changed, this is because of a current issue with Vue not working with the HMR when used with plain
.js
files as opposed to.vue
files.I have simply removed this line:
which returns the following message in the console when files are changed:
Now in an ideal world I would like the browser to refresh when this message is showing is this something I can implement easily without removing
webpack-hot-middleware
I don't want to have to remove the plugin in the event that the above Vue issue is resolved.Cheers.
The text was updated successfully, but these errors were encountered: