-
Notifications
You must be signed in to change notification settings - Fork 190
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
fix: adds resourceQuery to getSocketUrlParts to setup the socket #241
Conversation
by default it pulls from WDS's devServer option in the webpack config, and passes that as a resourceQuery. getSocketUrlParts changes allow it to use the resourceQuery primarily, and then fall back to the old method if resourceQuery isn't there.
updated. thanks for the review @patrikholcak |
@frehner Could you please take a look at this commit? https://github.com/patrikholcak/react-refresh-webpack-plugin/commit/b60aac065f85394a7a0aa50bed9df2cf898fba27 I looked into it again and wanted to ask if this really fixes the problem What I’m mainly talking about is this: react-refresh-webpack-plugin/sockets/utils/getSocketUrlParts.js Lines 33 to 40 in 71dacc6
If you look into the tests in this repo, the
I tried fixing it and I don’t think the I’m sure the I didn’t want to submit another PR with my changes because you already opened this one, but I can submit one to your repo and we can work in my changes if you want. And if not, that’s ok, too |
Ah I think the failing tests are making this much harder to debug 🙈 Meanwhile, I did a quick look at this PR and I think some of the changes here are not necessarily needed since for use our I think the changes proposed by @patrikholcak looks very promising to me - it would be really great if you two can consolidate the changes. Super thankful for you guys to explore this issue (my personal use cases for Webpack are usually not that complex 😆 )! |
hey that looks good. if you don't mind, go ahead and add a PR to my branch and we can definitely go with that simpler code. seems like it should work in my case I think - I'll verify it once it's merged. 👍 |
this reduces the amount of code changed while still fixing the issue Co-Authored-By: Patrik Holčák <72975+patrikholcak@users.noreply.github.com>
…pack-plugin into fix-socket-url
@patrikholcak I updated the code and added you as a co-author to the commit to give you credit for the work - let me know if that's ok. @pmmmwh I've incorporated the feedback and this code looks like it fixes the issue with my setup, so I'm going to remove the "In Progress" status from this PR in hopes that we're close 🙂 |
my fault - I totally missed that you had opened a PR for it. but in any case, I just merged in the additional work that you added. it's looking good! thanks for all your work |
🙌 great! Pleasure working with you! Hope to see this merged soon |
Had a busy week - finally got some free time to review this. I think this is almost good to go! |
Co-authored-by: Michael Mok <pmmmwh@gmail.com>
Co-authored-by: Michael Mok <pmmmwh@gmail.com>
Co-authored-by: Michael Mok <pmmmwh@gmail.com>
I didn't update the tests yet because I want to see if this is the right direction to go down before I finish the rest of it
…pack-plugin into fix-socket-url
This PR is ready to be reviewed again now :) |
I'll take a look (and hopefully merge it) tomorrow. I'm in the home stretch of fixing tests and will pull that in once it's ready. |
The good news is that the tests pass now. 😄 Thanks for merging in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had a final look at this and most comments are fairly minor.
Thanks for driving this and addressing all the comments and changes in a timely manner and sorry for dragging this for so long 🙏🏻
Also - I'm going to merge #242 tonight and that would incur some extra changes and merge conflicts that I can handle. Would you mind giving me write access to your branch so I can do that? |
add an additional test change the querystring to use template literals change getAdditionalEntries to take in a param object instead of multiple parameters update the JSDoc definition locations
Updated the PR with all of your feedback. Thanks! I believe you have access to my |
by default webpack-dev-server will use the host and port for socket connections if you don't have sockHost and sockPort defined, so we should do that as well here https://github.com/webpack/webpack-dev-server/blob/699404b091541242ad3d5f38f1a0022a83ff09b2/client-src/default/utils/createSocketUrl.js#L77-L79
it was pointed out to me that the code I had previously would only look at devServer's webpack-dev-server itself falls back to using |
I merged in and (hopefully) correctly resolved the conflicts from the main branch. tests don't run on cirlce - says |
This is so great!!! Thanks so much 🙇🏻♂️
I'm trying to get the secrets working for forked builds with Docker Hub authenticated pulls because of their new rate limit 🤦🏻 Edit: Merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more thing 👀
added that code and 2 additional tests for it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - will merge tonight!
@pmmmwh just wondering when you plan on creating a new release for the plugin so this change can go out? thanks again for your work on this 🙂 |
I'm working to have |
Fixes #216
by default it pulls from WDS's devServer option in the webpack config, and passes that as a resourceQuery.
getSocketUrlParts changes allow it to use the resourceQuery primarily, and then fall back to the old method if resourceQuery isn't there.