Skip to content

Start devServer dual-stack by default#13235

Open
LouisMT wants to merge 1 commit into
react:mainfrom
LouisMT:default-dual-stack
Open

Start devServer dual-stack by default#13235
LouisMT wants to merge 1 commit into
react:mainfrom
LouisMT:default-dual-stack

Conversation

@LouisMT
Copy link
Copy Markdown

@LouisMT LouisMT commented Jun 15, 2023

The default host for Webpack's devServer is currently 0.0.0.0. So we can reach our project on http://localhost:3000, but only over IPv4!

For browsers this isn't really a problem, as they fall back to IPv4 automatically. But other clients usually don't have such a fallback, and as more operating systems/frameworks will default to IPv6, this will cause problems.

By using :: instead of 0.0.0.0, the server will be available on both IPv4 and IPv6 by default.

I've tested this change locally, and the Node.js docs mention that dual-stack support is the default behaviour when using ::. But more testing might be needed.


A little more context: I ran into this issue because I'm using setupProxy to access my GraphQL API through the devServer. So I ran graphql-codegen against http://localhost:3000/graphql, and it tries to connect using IPv6.

@facebook-github-bot
Copy link
Copy Markdown

Hi @LouisMT!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants