Feature request: add a 'server' setting to vite.config.js

Hey @nolimits4web

would it be possible to add a setting to vite.config.js, which adds the --host option?

Reason: Most of the time I’m developing on one machine and have multiple other devices connected. So the first thing I do when running a new project is, to modify vite.config.js expose my localhost to the network:

server: {
    host: true
},

It would be much appreciated (at least for me), if there was an option to expose my localhost initially.

Possible?

thx
andy

Added in latest CLI v5.0.6

1 Like

Great! Thanks!

btw. I really like the new ‘vite’ bundler pretty much!

And just one more question comes to mind:
If I want to run/install a PWA from a subfolder, how can I add the “start_url” in config?

e.g. manifest.json should add:

At the moment, I just add it to manifest.json, but wouldn’t it make more sense to add it to config.js?

“start_url”: “/subfolder/another/index.html”,