-
Notifications
You must be signed in to change notification settings - Fork 127
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
Remove HMRE and allow vanilla HMR #192
Conversation
I don't think we should remove the ability to use Could this be updated to keep those, but still allow vanilla HMR? The way I envisioned it, if the proper loaders were not installed the function would return early but not reset |
Sure! I'll try to come up with something tonight |
If we don't reset the |
Perhaps we should just leave HMR on all the time as part of the base, people could explicitly turn it off if they want, but I feel like that would be the exception, not the rule. |
I mean, a big part of the reason people use this... at least I think, is to get free style hotloading just working out of the box without the need for running browser plugins. Seems like a logical default to leave on and then if people really wanted to turn it off they could configure it directly by passing a devServer option. |
Yeah, I agree. With the number of different ways and reasons people would use HMR I think we should remove the checking of which loaders/plugins are installed, and instead just add the |
@lukearrys something like this? var webpack = require('webpack')
var path = require('path')
function load (config) {
// add hot loading clientside code
config.entry.unshift(
// Full path to webpack-hot-middleware so it works in npm2 and npm3
path.join(path.dirname(require.resolve('webpack-hot-middleware')), 'client')
)
// add dev plugins
config.plugins = config.plugins.concat([
new webpack.HotModuleReplacementPlugin()
])
}
module.exports = {
load: load
} |
@imranismail Looks good to me! 👍 |
@imranismail Also after reading this comment and the short term fixes here I think it'd be best to leave in the |
I've submitted the changes in another PR, gonna leave this fork untouched for now. |
This should close #188