cordova-serve icon indicating copy to clipboard operation
cordova-serve copied to clipboard

forward the CLI user arguments to cordova-serve/browser

Open Max104t opened this issue 6 years ago • 5 comments

Feature Request

Motivation Behind Feature

I'm trying to pass --allow-file-access-from-files --disable-web-security to chromium, and it seems that cordova-serve/src/browser and callers are dropping the command line arguments.

Where should I forward this feature request? Thanks!

Feature Description

Forward the CLI user arguments to cordova-serve/src/browser from cordova-browser:

return server.launchBrowser({
    target: args.target,
    url: projectUrl,
    userArgs: args.remain
});

Then pass these arguments to the browser during launch in cordova-serve/src/browser

module.exports = function (opts) {
    var userArgs = opts.userArgs || '';
     /* ... */

function getBrowser (target, dataDir, userArgs) {
    /* ... */
}

Alternatives or Workarounds

Launch chrome manually and let the default instance handle local host launching

Max104t avatar Oct 18 '19 02:10 Max104t

Is this implemented already ?

brunobertechini avatar Mar 20 '20 07:03 brunobertechini

yes, I can send a merge request!

Max104t avatar Apr 13 '20 20:04 Max104t

@Max104t This looks like a good change. It would be nice if you could submit a pull request with your commit as it looks well done.

NiklasMerz avatar Nov 27 '20 12:11 NiklasMerz

My account is locked.. please feel free to fork and merge my branch..

Max104t avatar Feb 17 '21 00:02 Max104t

I've gone ahead and created #42 while retaining your original commit.

timbru31 avatar Feb 17 '21 10:02 timbru31