apache / cordova-browser

Apache Cordova
Apache License 2.0
170 stars 85 forks source link

Add an optional flag to prevent opening a new browser tab #109

Open jeseibel opened 1 year ago

jeseibel commented 1 year ago

Feature Request

Motivation Behind Feature

In order to view file changes you need to stop and restart the browser server; when that is done Cordova opens a new tab on the active browser, even if a tab is already open for the Cordova project. Having to close the currently open tab each time the server is rebooted gets annoying.

Feature Description

Add a optional argument --no-launch which will start the server, but won't open a new browser window/tab.

Example: cordova run browser --no-launch

Alternatives or Workarounds

Using cordova serve achieves this functionality; however, serve currently has an issue with loading plugins:

image

(The plugins work as expected when using cordova run browser or cordova run android.)