resolve webpack-hot-middleware conflicts#49
Conversation
|
CC @blainekasten would be great if you can provide some insights on this. I will take a look at the WHM docs tomorrow. |
|
In short, via
the WHM client If they have different |
|
@pmmmwh we face the same issue in our cli. we use a seperate server with webpack-hot-middlware and we also see that behaviour. Would be cool if you could merge that #soon. |
|
Hi! I have taken a look at this and I think a better way to handle this would be to:
(I'm assuming that requiring the client with the same path will not execute Update: |
|
😮 I guess Only use the WHM |
There is handling for the |
Yes, I am experimenting with dynamic import or just scrap the idea of injecting the |
|
Since #64 has been merged I'll close this for now. |

When I use webpack-hot-middleware with a custom
path:server.js
webpack.config.js
The client will send two HMR requests:
The
require('webpack-hot-middleware/client')in WHMEventSource.js will create a newEventSourceWrapper, and thepath(from query) is the key ofEventSourceWrapperin webpack-hot-middleware:https://github.com/webpack-contrib/webpack-hot-middleware/blob/cb29abb9dde435a1ac8e9b19f82d7d36b1093198/client.js#L119
So inject user's
webpack-hot-middleware/cliententry beforeErrorOverlayEntry, and try to customize overlay on the existing client.https://github.com/webpack-contrib/webpack-hot-middleware/blob/cb29abb9dde435a1ac8e9b19f82d7d36b1093198/client.js#L302
https://github.com/webpack-contrib/webpack-hot-middleware/blob/cb29abb9dde435a1ac8e9b19f82d7d36b1093198/client.js#L152