You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Webpack-Dev-Server will not necessarily use the correct port when making requests to the dev server. It will instead assume the port that the dev server is running upon.
This becomes a problem when used with items like Ngrok. Ngrok offers a way to create HTTP tunnels. You can make localhost:3000 accessible to the world via https://public.url.
The issue is that, while all content can be correctly served and the site usable, Dev Server will attempt to communicate with https://public.url:<dev server port number>. It needs to instead use the port number from the current address.
Probably a simple case of ensuring the plugin doesn't assume a port.
Not yet familiar enough with Prefresh to say whether it's an issue for this repo or its, so leaving this here while I investigate.
What is the expected behaviour?
That the request from the Dev Server goes to the correct address
The text was updated successfully, but these errors were encountered:
I don't think that is an issue with prefresh as much as it is an issue with how the web-dev-server/hot-plugin is injected, a different port should be reflected on that I'd think.
Fair enough, I currently know probably next to nothing about what Prefresh is actually doing, so I just took a guess before investigating further. Certainly will look at those then.
I guess a good entry point would be to check whether or not normal hot-mode works i.e. if signals reach the client and if normal preact dev full reload mode works
rschristian
changed the title
Prefresh uses the port of the dev server regardless of where the content was served from
Webpack-Dev-Server uses the port of the dev server regardless of where the content was served from
Feb 7, 2021
This looks to be a famously challenging problem (now that I've been pointed in the right direction, sorry Prefresh!), so a solution probably isn't going to be pleasant, just in case anyone else runs into this.
Do you want to request a feature or report a bug?
Bug
What is the current behaviour?
Currently Webpack-Dev-Server will not necessarily use the correct port when making requests to the dev server. It will instead assume the port that the dev server is running upon.
This becomes a problem when used with items like Ngrok. Ngrok offers a way to create HTTP tunnels. You can make
localhost:3000
accessible to the world viahttps://public.url
.The issue is that, while all content can be correctly served and the site usable, Dev Server will attempt to communicate with
https://public.url:<dev server port number>
. It needs to instead use the port number from the current address.Probably a simple case of ensuring the plugin doesn't assume a port.
Not yet familiar enough with Prefresh to say whether it's an issue for this repo or its, so leaving this here while I investigate.
What is the expected behaviour?
That the request from the Dev Server goes to the correct address
The text was updated successfully, but these errors were encountered: