question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vite cli doesn't work with --host

See original GitHub issue
vite --host 0.0.0.0

will lead to

  > Local:    http://localhost:3001/

in addition the open in the browser thing will crash the container in docker, I have to add --open 0 to make it work, which is a bit weird as I thought --open false would work (and also I wouldn’t even need that in docker)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mimoocommented, Mar 8, 2021

0.0.0.0 means your listening to all IP addresses. This is necessary if you’re running vitejs in a docker container (which I’m doing right now).

1reaction
patak-devcommented, Mar 19, 2021

@mimoo, for reference, there is an open PR for supporting --open false, that fixes #2552 Would you confirm that 0.0.0.0 is acting as expected and we can close this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Server Options - Vite
When running Vite on WSL2, file system watching does not work when a file is edited by Windows applications (non-WSL2 process). This is...
Read more >
Troubleshooting - Vite
If you are using Linux, file descriptor limits and inotify limits may be causing the issue. As Vite does not bundle most of...
Read more >
Deploying a Static Site - Vite
The vite preview command will boot up a local static web server that serves the files from dist at http://localhost:4173 . It's an...
Read more >
Configuring Vite
Note that Vite doesn't load .env files by default as the files to load can only be determined after evaluating the Vite config,...
Read more >
Preview Options - Vite
This can be set via the CLI using --host 0.0.0.0 or --host . ... the next available port so this may not be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found