Skip to content
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

Allow hot reload sockPath to be changed #7597

Closed
brunomazzardo opened this issue Aug 26, 2019 · 3 comments · Fixed by #7750
Closed

Allow hot reload sockPath to be changed #7597

brunomazzardo opened this issue Aug 26, 2019 · 3 comments · Fixed by #7750

Comments

@brunomazzardo
Copy link

brunomazzardo commented Aug 26, 2019

Is your proposal related to a problem?

Right now when using CRA behind a proxy, I can redirect all assets and bundle requests to some custom path, but the hot reload socket has a hardcoded path.

Describe the solution you'd like

Allow an extra option to be used, named equal to webpack custom socket pathname, sockPath, to be used by the developer. It needs to use WebpackHotDevClient.js, within react-dev-utils package and the sockPath config needs to be sent to webpack, on webpackDevServer.config.js

Describe alternatives you've considered

Nothing that I tried differently than changing the node_modules files worked

Additional context

I would be willing to implement this if the community feels like this will have so use for others than me.

@brunomazzardo brunomazzardo changed the title Allow sockPath to changed Allow hot reload sockPath to be changed Aug 26, 2019
@brunomazzardo
Copy link
Author

@dmile Sorry to notify you from nowhere, but I saw you had a branch with a fix and was waiting to open a PR, care to revive the discussion? I think I will open a PR tomorrow with a possible solution, maybe you can check it and we can discuss it?

@dmile
Copy link
Contributor

dmile commented Sep 8, 2019

Hi @brunomazzardo!
Yep, same functionality discussed here. The fix is about reducing hard-code with socket path, by making it configurable. It adds a new functionality to project - that's why it not included to previous bug-fix. But I've tested a basic scenario - it works.

@heygrady
Copy link
Contributor

This would be helpful. I’m working on a project where we proxy a path for multiple create-react-app instances (“/a” -> app a, “/b” -> app b). It would be helpful to be able to set the sockPath per app. Currently it’s impossible to develop more than one app at a time.

@lock lock bot locked and limited conversation to collaborators Feb 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants