Closed mandrasch closed 1 month ago
I get your point why this would be interesting. However, I try to keep this as simple as possible, which is why I try to get away with just letting vite run in the foreground. At least from my personal experience, I find the feedback from vite dev server helpful during development, which is why I would prefer for it to run in the foreground anyways.
Maybe I should add a clear disclaimer to the project's readme about the narrow focus of this project: To have a single (!) vite server running alongside your main project in ddev (written in php or whatever), without leaking its port to the host system.
Hey,
because of a support request in DDEV Discord, I briefly checked out how Andy Blum worked with pm2 in https://github.com/Lullabot/ddev-node-js-demo
The thing I personally liked about this approach is the flexibility in configuring your
apps.config.js
If vite sidecar would use it, developers could easily switch to their preferred package manager and preferred start command?
There is also
ddev pm2 logs
and a start / stop / kill option.The downside is - of course - a bit more technical complexity. 🤔
And developers would have to change their
vite.config.js
as well to respond to all network requests, etc. - since this is not covered by the plugin anymore.Btw: I'm currently thinking generally about what would be the easiest, but most configurable / flexible way of providing a Vite plugin for DDEV users with PHP projects.
I guess the current philosophy / goal of your plugin is "install the plugin, Vite just works"?