-
-
Notifications
You must be signed in to change notification settings - Fork 361
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
Does this work with hot loading? #29
Comments
webpack-dev-server uses webpack-dev-middleware You can use HMR, but you need to implement the change notification by yourself. |
Ok, thanks! I had a look at code. Maybe it would make sense to separate the HMR bit so it's easier to compose but apart from that we can probably consider this issue resolved. Incidentally I noticed that |
👍 Thanks |
@dtothefp Middleware was too low level for my purposes after all.
@dtothefp Can you describe your use case? |
@bebraw thanks, I'm familiar with the
Generally I use
bundled with my entries. If I add the first script I'm assuming what @sokra is talking about above relates to this https://github.com/webpack/docs/wiki/hot-module-replacement-with-webpack#from-the-module-view so I guess I just need to dig into the docs more |
@sokra could you please give me some advice on
I'm a little confused from the docs and the example app, as I can't figure out what handlers to apply to create |
@dtothefp You need to call http://webpack.github.io/docs/hot-module-replacement.html#management-api |
@sokra I actually am calling https://github.com/dtothefp/webpack-middleware-test/blob/master/lib/index.js#L32 but was getting errors because it kept telling me |
hmm... It shouldn't be so complex. Take a look at the file in |
For anybody that is struggling with getting HMR working, I created a node module that implements HMR on top of webpack-dev-middleware. You can find it here. |
another module that works: https://www.npmjs.com/package/webpack-hot-middleware |
I see
WebpackDevServer
comes with special support for hot loading. Middleware does not seem to include it. Is it possible to use the middleware with hot loading somehow?The text was updated successfully, but these errors were encountered: