Skip to content

This plugin assumes that the browser and Vite are running on the same machine #5

Open
@ngld

Description

@ngld

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions