Skip to content

Hot reload when another webpack dev server reloaded #3355

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

Closed
1 of 2 tasks
cjnoname opened this issue May 27, 2021 · 3 comments
Closed
1 of 2 tasks

Hot reload when another webpack dev server reloaded #3355

cjnoname opened this issue May 27, 2021 · 3 comments

Comments

@cjnoname
Copy link

cjnoname commented May 27, 2021

  • This is a bug
  • This is a modification request

For Features; What is the motivation and/or use-case for the feature?

Hi,

Is there a way to monitor another dev server running on local and reload the current app together with it?

I use module federation plugin on Webpack 5 and it's running different apps from local.
For example the container app is running on localhost:3000 and a child app is running on localhost:3001 with both running on webpack dev server.

If I made a change on the the app on 3001, then it will reload. But I want to find a way to reload the app on 3000 at the same time.

Any suggestions on this?

Thanks
CJ

@alexander-akait
Copy link
Member

No way, it is on roadmap, but you can do it in client, send a signal using websocket and say what you need reload, but it is not easy

@cjnoname
Copy link
Author

No way, it is on roadmap, but you can do it in client, send a signal using websocket and say what you need reload, but it is not easy

Thanks for your reply. Looking forward for this feature.

@alexander-akait
Copy link
Member

It is not feature, you should do it on your side, we have web socket api, you can use it for this, send this message https://github.com/webpack/webpack-dev-server/blob/master/client-src/index.js#L131 or you can use webpack API and invalid compilation when something was changed inside your custom plugin, it is rare case so we will not implement it in core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants