web icon indicating copy to clipboard operation
web copied to clipboard

[dev-server] Configure what browser should be used when --open is used.

Open Pieterv24 opened this issue 1 year ago • 0 comments

I would like a way to configure what browser should be used when the --open parameter is passed. This can be handy for creating different (manual) test scenarios quickly with scripts.

I saw that in /packages/dev-server/src/openBrowser.ts the "open" package is used to open the browser window. This package supports more configuration when opening a browser window.

I would say the easiest approach here, is to add a new field to the DevServerConfig which contains the needed information.

The open package has an apps export, which is either: 'chrome', 'firefox', 'edge', 'browser' or 'browserPrivate' we could probably do some type checking/input validation based on this. Additionally the openBrowserWindow function can take arguments, for example '--incognito' this would also be a nice to have in my opinion.

Pieterv24 avatar Sep 12 '24 08:09 Pieterv24