Description
If I understood correctly, the plugin assumes that the browser can access config.root
using the same path as Vite itself. However, if you're running Vite inside a VM or container (WSL, Vagrant, Docker), this is most likely not the case (even if the website is accessed through 127.0.0.1:<port>
).
Having a configurable browserRoot
option or something similar would be useful for these cases. I doubt it's possible for the plugin to automatically detect the correct path in all cases so it'd be nice to have a setting to override the auto-detected path. In some cases, better auto detection could help, as well. On WSL, the plugin could run wslpath -w /path/to/root
to get the Windows path for the browser but even this solution makes assumptions because it's perfectly possible that the developer is running the browser itself in WSL (though it's probably a rare combination).