Open
Description
Describe the bug
Once viject passed, can't activate listening on network with --host
.
To Reproduce
Steps to reproduce the behavior:
- Create a CRA
- Run it, you can access through localhost and from the network (192.168.0.0/24)
- Run viject
- Can't access from the network
Steps to reproduce the behavior:
- Create a Vite app
- Run it, you can access through localhost and from the network (192.168.0.0/24)
Expected behavior
It seems that modifying vite.config.ts by adding server configuration in the defineConfig is not used. Same for --host
variables from cli.
Workaround
In devServerPlugin, change host to host: HOST || '0.0.0.0',
to have the default value as opened is working.
From the CLI, HOST='0.0.0.0' yarn dev
is also working.
So, this is the normal behaviour with actual plugins, but if you check StackOverflow, Reddit, etc. some hints will not work. Maybe add some documentation or a comment in the vite.config.ts?
Anyway, awesome tool! Thank you!
Metadata
Metadata
Assignees
Labels
No labels