Open rangzen opened 1 month ago
I found out that the CLI options weren't working because the plugin wasn't respecting the user configuration. I plan to address this issue for plugins other than devServer as well.
For now, I've released a quick fix that changes localhost to 0.0.0.0.
Thank you for reporting!!!
Describe the bug Once viject passed, can't activate listening on network with
--host
.To Reproduce Steps to reproduce the behavior:
Steps to reproduce the behavior:
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!