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

Vite Local address is badly formatted when using multiple --host #10424

Closed
7 tasks done
Njiallu opened this issue Oct 11, 2022 · 0 comments · Fixed by #10474
Closed
7 tasks done

Vite Local address is badly formatted when using multiple --host #10424

Njiallu opened this issue Oct 11, 2022 · 0 comments · Fixed by #10474
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@Njiallu
Copy link

Njiallu commented Oct 11, 2022

Describe the bug

When using vite cli with option --host the address displayed in the Local section is badly formatted when using multiple instance of --host.

For example :

# Works well
yarn vite --host
# ➜  Local:   http://localhost:5000/
# ...

# Funny
yarn vite --host --host --host --host
# ➜  Local:   http://true,true,true,true:5000/
# ...

Reproduction

https://stackblitz.com/edit/vitejs-vite-4ojysf?file=package.json

Steps to reproduce

npm install && npm run dev

System Info

System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1
    Memory: 151.27 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 16.13.1 - /usr/local/bin/node
    Yarn: 1.22.17 - /usr/local/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 100.1.37.109
    Chrome: 105.0.5195.125
    Firefox: 105.0.1
    Safari: 16.0
  npmPackages:
    @vitejs/plugin-react: ^1.3.2 => 1.3.2 
    vite: ^3.1.7 => 3.1.7

Used Package Manager

yarn

Logs

No response

Validations

@sapphi-red sapphi-red added bug p2-nice-to-have Not breaking anything but nice to have (priority) and removed pending triage labels Oct 11, 2022
@ilteoood ilteoood mentioned this issue Oct 11, 2022
9 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
None yet
2 participants