-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[v4.3.0] auto-detected local server url is broken #2943
Comments
This is very strange, because from half of the developers I hear that they want behavior as in Node.js, i.e. IPv6, others want the opposite, but this should not appears:
|
To be honestly there is no bugs on webpack-cli side, here two things:
Let's move it in webpack-dev-server repo and fix it and do beta release |
But where |
TBH, I never seen anyone uses ipv6 addresses for local development. Not to say it's necessarily uncommon, but it's certainly less tested. The --open itself uses that ipv6 url, and so the client itself breaks with that domexception. The browser does open properly... |
I need some think about this, I don't have strong opinion here, yep, it is rare, but from other side, using it is not bad, someone should start using IPv6 😄
Yep, client should be fixed anyway, you can send a fix and help me |
Workaround: specifying |
Investigated this a bit. Raw IPv6 addresses in urls need to be put inside brackets as they contain colons and would conflict with the URL port part. Dev server opens page It looks like here
s/^\[(.*)\]$/$1 before calling url.format as url.format calls the native URL api which can't be modified.
|
Yep, feel free to send a fix |
I am finishing with webpack-cli, so new beta releases and fixes will be soon |
If it's no bother, it would be nice for the URL to be That's because I have a custom certificate for Thanks in advance. |
I think solution is simple here -
|
So you can click on any link, for |
Let's keep open I want to improve status message |
Thanks. |
Describe the bug
Starting with v4.3.0, when launching
webpack serve --open
, the detected server address ishttp://[::]:8080/
.I'm guessing this has something to do with ipv6 or similar.
What is the current behavior?
CLI output says
Project is running at http://[::]:8080/
, and --open launches browser with client failing with:To Reproduce
Steps to reproduce the behavior:
I'm guessing this behavior depends on the environment.
I just ran
webpack serve
on a typical project (https://github.com/wixplosives/sample-monorepo/blob/master/packages/app/webpack.config.js)Most of the above config is just the defaults. Nothing customizes dev-middleware/server.
Expected behavior
Detect local address as
localhost
or127.0.0.1
. Same as previous versions.Please paste the results of
webpack-cli info
here, and mention other relevant informationThe text was updated successfully, but these errors were encountered: